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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

background refreshes when i don't want it to :(

Status
Not open for further replies.

greengrassbrian

Technical User
Mar 26, 2004
33
US
please help me...i have a project page with thumbnails and some thumbnails have popups - when you click on a popup however the background page will refresh and take you back to the beginning and you'll lose your place...

for example:

on this page you start at the beginning...then go to the next thumbnail (top, second from left) and click on it...it brings a new image up on the left. click on this image to see the popup - once you do you will notice the background refreshes taking you back to the first image when you should still be on the second....please help!
 
Okay, I guess the real problem is this:

The popup window has a reload function in it that refreshes the parent page, but whenever I take it out the javscript stops working on the parent page, so that when i rollover a thumbnail the large image won't appear...

Any thoughts?
Please help!!
 
Not sure. I always use < href="#" onclick="dosomestuff();return false;><img ....></a>

The return false I believe is a must.
 
I think I tried that but it didn't work...here's a piece of the code:

<map name="Map02"><area alt="" coords="0,0,400,295" href="javascript:popupWin('popup_ranch_02.html','ranch','690','432')"></map>



where would i put the 'return false' ?
 
<area alt="" coords="0,0,400,295" href="javascript:popupWin('popup_ranch_02.html','ranch','690','432');return false">
 
thanks so much for helping me! - unfortunately it gives me an 'error on page' error at the bottom when i click on the image with that code....

let me give you some more of the code...

<a href="javascript:;" onClick="document.images['main'].src='images/ranch_02_img.jpg';document.images['textImg'].src='images/spacer.gif';document.images['altImg'].src='images/ranch_02_txt.gif';document.images['main'].useMap='#Map02';">

<img src="images/ranch_thumb_02.jpg" alt="" width="69" height="69" hspace="0" vspace="0" border="0"></a>

<map name="Map02"><area alt="" coords="0,0,400,295" href="javascript:popupWin('popup_ranch_02.html','ranch','690','432')"></map>

any ideas?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top