PDA

View Full Version : Changing Layer contents causes page to jump



Daiv
09-14-2006, 05:17 AM
I currently am working on a site and they would like to have a bunch of tetimonials available. Because their layout is very limited I thought it would be nice to have a layer that changes the testimonial text when the user clicks on an image.

When they do this, though, the page jumps to the top. does anyone know how to stop this?

You can see the page I am working on at www.communitykollel.org/indextest.htm

Scroll down and click on the thumbnails.


thanks!!!

jscheuer1
09-14-2006, 07:18 AM
Where you have this (and similar):


<A href=# onClick="changeText('mytest',1);">

It should be like:


<a href="#" onclick="changeText('mytest',1);return false;">

Even better would be to skip the link altogether and to assign style and the event to the image something like so:


<img style="cursor:pointer;border:3px solid cyan;" onclick="changeText('mytest',1);this.style.borderColor='purple';" src="images/testimonials/avrum_small.jpg" name="avrum" width="90" height="90" alt="">

Daiv
09-15-2006, 12:35 AM
Thanks!!!

Your suggestions worked perfectly.

Daiv