Copy link to clipboard
Copied
I want to make a hyperlink to an amazon page, childrens books.
<li><a href="#" onclick="MM_openBrWindow('https://www.amazon.com.au/Children-Books/b?ie=UTF8&node=4893846051');return false">Children's Books</a></li>
this is my code. The link works fine, except it opens the amazon link in a seperate window. I want it to replace the current window with the amazon page. I think this is because of "MM_openBrWindow"
What can I replace this with so the amazon tab will open in the same tab/window?
I am new to dreamweaver and HTML in general so please be thorough
thanks,
Copy link to clipboard
Copied
If you just want the link to go to the new page, get rid of the script and use a standard <a href> link...
<li><a href="https://www.amazon.com.au/Children-Books/b?ie=UTF8&node=4893846051">Children's Books</a></li>
Copy link to clipboard
Copied
I agree with Jon. There's no reason to use a JavaScript event trigger when you don't have to. Ordinary HTML is all you need.
To open external links in a new browser window or tab on desktops, add target="new"
to the anchor tag.
<a href="https://www.amazon.com.au/Children-Books/b?ie=UTF8&node=4893846051" target="new">Children's Books</a>
Note: mobile browsers only have one window.
Copy link to clipboard
Copied
For some reason, Jons link gave me a 'amazon refused to connect' screen, but yours worked how it should.
I didnt put a javascript event trigger there, I dont even know what that is. I'ts part of an assignment where I have to fix the issues with the website. I downloaded the code from my teacher. This was the one thing I couldnt figure out.
Big thanks.