How to open external link in Dreamweaver in same tab

New Here ,
Nov 16, 2021 Nov 16, 2021

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,

Views

84

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 16, 2021 Nov 16, 2021

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>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 16, 2021 Nov 16, 2021

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.

Number of Mobile Internet Users Increased to 92.6%

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2021 Nov 17, 2021

Copy link to clipboard

Copied

LATEST

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines