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!

Stop parent window scroll when link to pop up window 2

Status
Not open for further replies.

guppie

Technical User
Sep 10, 2001
3
GB
Read
I'm working on a large website and I have a link to show items in a seperate pop up window. However when the image is clicked to view the item the parent frame will not stay static and its annoying. I want for people to view the image close the small window and be able to carry on scrolling from where they were.
Any suggestions.
 
hi,

this is just a guess and may not work but its worth a try.

i'd try dropping the image names from the href and replacing with href="#". I'd then add return false to the onclick - with your code it would look like this...
Code:
<a  name=&quot;#0901215&quot; href=&quot;[b]#[/b]&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('document.Image16','document.Image16','../gifs/view-m.gif','#974366540300')&quot; onClick=&quot;MM_openBrWindow('0901215.htm','','width=300,height=310');MM_swapImgRestore()[b]; return false[/b]&quot;><img name=&quot;Image16&quot; border=&quot;0&quot; src=&quot;../gifs/view-n.gif&quot; width=&quot;22&quot; height=&quot;22&quot;></a>

hope it works for you

rob
 
Hi guppie,

Try this:

Code:
<a  name=&quot;#0707282&quot; href=&quot;javascript:MM_openBrWindow('0707282.htm','','width=300,height=310');MM_swapImgRestore();&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('document.Image26','document.Image26','../gifs/view-m.gif','#974365172866')&quot;>

you can do the same with the link for &quot;add to inquiry&quot;:

Code:
<a  name=&quot;#0707282&quot; href=&quot;javascript:ADD_ITEM ('0707282','20PC  PORCELAIN  DINNER  SET  MARDI  GRAS','','N/A');&quot;  onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('document.Image9','document.Image9','../gifs/addtoform-n.gif','#974295151683')&quot;>

Erik
 
Hi Eric,
Thanks for your help. I'm stuck with the second part to do with the add to inquiry. the mouseover isn't working. Heres what I've got just now-

<td width=&quot;100&quot; height=&quot;2&quot; rowspan=&quot;2&quot;><a name=&quot;#0101151&quot; href=&quot;javascript:ADD_ITEM('0101151','3pc enamel saucepan set','','N/A');&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('../gifs/addtoform-n.gif')&quot;><img name=&quot;Image30&quot; border=&quot;0&quot; src=&quot;../gifs/addtoform-m.gif&quot; width=&quot;20&quot; height=&quot;19&quot;></a></td>
Any help would be appreciated thanks.
guppie
 
your function MM_swapImage has 3 values like:

onMouseOver=&quot;MM_swapImage('document.Image9','document.Image9','../gifs/addtoform-n.gif')

now you have only filled in one???

Erik

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top