I have a large picture on my homepage 3/4 of the way down and several smaller pictures around it which swap with the big one when clicked. Below is some of the code for the image swap. The problem is when they click on a picture to swap it it reloads the page at the top and they have to scroll back down to view it again. This makes it really inconvenient if the visitor wants to view all 8 pictures. Is there a way to make it reload at the same place after they click on a picture? <th height="80" scope="col"><a href="#" onclick="MM_changeProp('picture','','src','images/________.jpg','IMG')"><img src="images/thumbs/________.jpg" width="120" height="75" border="0" /></a></th> </tr> <th width="390" valign="top" scope="col"><img src="images/________.jpg" name="picture" width="390" height="251"/></th> Thank You
It's hard to tell for certain without seeing exactly what the script is doing, but what happens when you move the Javascript into the href and out of the event handler? <a href="javascript:MM_changeProp('picture','','src','images/________.jpg','IMG')">
That works perfectly, however it just enlarges the smaller thumbnail picture, which has terrible resolution when blow up. The original script used a separate larger photo for the swap. Any suggestions for this, here is a more accurate copy of the script: <th height="95" scope="col"><a href="#" onclick="MM_changeProp('picture','','src','images/largepicture.jpg','IMG')"><img src="images/thumbs/thesmallerpicture.jpg" width="120" height="90" border="0" /></a></th> Thank You
All I did was move the function out of the event handler - I just rearranged the furniture a bit I didn't post the full code in my last post, just the part I changed. Maybe that was the problem. Here's exactly what you wrote above, but with the modification I made: <th height="95" scope="col"><a href="javascript:MM_changeProp('picture','','src','images/largepicture.jpg','IMG')"><img src="images/thumbs/thesmallerpicture.jpg" width="120" height="90" border="0" /></a></th>