Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Javascript behavior to open new window 1

Status
Not open for further replies.

coben

Instructor
Apr 16, 2002
50
0
0
US
I have created a relative link in DW MX and wish to have the link open in a new window. I went to the behaviors panel and added the onClick Open Browser Window behavior to the <a>. The problem I'm having is that not only does the page open in the new window (which is what I want), it also opens in the parent window that the link was on. How do I keep the underlying window from changing?

Thanks.
 
put &quot;:return false&quot; at the end of the javascript funtion

<a href=&quot;link.htm&quot; MM_openbrowser=&quot;.....:return false&quot;>

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
put &quot;:return false&quot; at the end of the javascript funtion

<a href=&quot;link.htm&quot; onclick=&quot;MM_browseropenfunction.....:return false&quot;>

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
When I try your suggestion I get a scripting error. I'm probably not putting the :return false in the right place. Here is the tag, where should I put it? Thanks.

<a href=&quot;/classes/needs.htm&quot; onClick=&quot;MM_openBrWindow('/classes/needs.htm','','scrollbars=yes,height=200')&quot;>Special Needs</a>
 
<a href=&quot;/classes/needs.htm&quot; onClick=&quot;MM_openBrWindow('/classes/needs.htm','','scrollbars=yes,height=200'); return false&quot;>Special Needs</a>

i also messed up its a ; not a :

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top