View Full Version : Image Thumbnail Viewer II & Links

03-29-2005, 09:00 PM
I am quite new to DHTML, and now i am having difficulties with a script.
I am using the "Image Thumbnail Viewer II" on my site.
And i have used the onclick textual version, now, what i want it to do is this.
When the link is pressed I want the image to swap, and then i want the page in my Iframe to switch to the one stated in my link, now ive been trying all night, but it just wont work...
appreciate any help that i can get!

03-30-2005, 09:58 AM
Please do ask if you dont understand my question....

03-30-2005, 02:54 PM
Okej! I am going to try and explain a bit better with a piece of code....

<a href="start.php" target="I1" onClick="return modifyimage('dynloadarea2', 0)">

Now, as you can see i have a file called "start.php" and i want it to show in an iframe called "I1" when you press the link, I also want the image defined by "0" to show in the "dynloadarea2"... How should i do this?
Hope this helps you a bit...

03-30-2005, 03:27 PM

Okej! I am going to try and explain a bit better with a piece of code....Although further explanation was needed, you should also show a little more patience. You only posted this question yesterday!

<a href="start.php" target="I1" onClick="return modifyimage('dynloadarea2', 0)">[...]I also want the image defined by "0" to show in the "dynloadarea2"In addition to the warning above, you should also post a URL to an example so people can see what you've attempted.

In this instance, you don't want to return the value from modifyimage. When you return false from an event listener, certain event types can be cancelled (including click). This causes the default action for that event to be suppressed. Currently, whilst the image will change, the link will do nothing as you cancel the implied navigation. Remove the return statement, leaving just the function call.


03-30-2005, 07:33 PM
Thank you Mike for your post!
I am very sad that I behaved in a bad way...
totally missed to link to the script i was talking about...
I will try to do better next time around....
I was also in a bit of jam, and really needed this to work, thus the impatience..
furthermore, YOU are a god in human shoes! :D
Thank you Mike