Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   Dreamweaver General (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=168)
-   -   Problem adding behaviour to a pic (http://www.dreamweaverclub.com/forum//showthread.php?t=23535)

becky gelke 05-03-2006 12:56 AM

Problem adding behaviour to a pic
 
I want to add a behaviour to several thumbnails on a site I am building. I want to be able to click the thumbnail then get a bigger picture of the same pic to open in a new window, with a size I can specify. I have tried to do this by adding a behaviour, then selecting the 'open browser window' option, flillng in all the details, size url etc. but then nothing happens, Am I forgetting to do something? Is there perhaps a small piece of code I can attach to each thumbnail to get them to perform this action for me.

becky gelke 05-03-2006 04:27 AM

I think I have sorted it out now, I was using DW4 tried it in MX and it worked fine. It was simply a matter of changing the html from "onload" to "onclick" if anyone is having the same prob. I presume I have done it right??

domedia 05-03-2006 05:11 AM

Yes, you got it :)

becky gelke 05-03-2006 05:32 AM

Thanks for that, but I dont quite have it unfortunately. I am adapting a template, when I select the pics in question they already have the # attributed to them, then when I add the behaviour it all works OK, the prob is it also has the effect of flying to the top of the page also. I have added the offending line below. I still want the pics to be hyperlinks (or turn into a hand when moused over, but dont particularly want to go back to the top of the page each time...any ideas??

[img]images/w23.jpg[/img]

domedia 05-03-2006 06:01 AM

It's flying to the top of the page because your browser is looking for your link ("#").
If you can I would put the link to large.html as your link, move the onclick function call to your anchor tag, and add a return(false) to have javascript disable the anchor link:


All times are GMT. The time now is 06:09 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com