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!

How do I refresh a window and stop origin window jumping top of page

Status
Not open for further replies.

jezx

Technical User
Jul 15, 2002
18
0
0
GB
I have used this code which works great but now the origional window (contains open.window code)jumps to the top of the page. How can I stop it and get it to remain static when clicked

href=# and onClick=goTo(URL);


function goTo(URL)
{
newWin = window.open(URL,'','HEIGHT=385,WIDTH=450,');
newWin.focus();
}//end goTo(var, var)
 
add return false to the end of your onclick code otherwise the window will fire the # href

href=# onClick="goTo(URL); return false;"
 
Once again that is great and thanks. works a treat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top