Image Swap
- Started
- Last post
- 10 Responses
- radar
Looking for the easiest way to swap/change an image without reloading the page & definitely don't want an iframe or anything. Like to look at multple screenshots on a page by clicking numbers similar to feed section on QBN.
I imagine PHP would do it, but looking for a simple solution.
- ninjasavant0
Behaviors in Dreamweaver?
- which are you referring to, the basic image swap? That is just for rollovers right?radar
- you can name an image instance and remotely swap it.ninjasavant
- radar0
nobody?
- radar0
Is it considered a behavior or an extension?
- 7340
you want a behavior... onmouseover, onclick... or something to that effect. for example:
onclick="javascript:change('pic1...
i have a simple function on my website if you want to check the source code on the artwork page... awake.graphicode.net
- granted its doing more than just changing the image... it's also changing some text, but you're mostly concerned with the img named 'artpic' and the line of code in the functions that change document.artpic.src734
- 7340
sorry my comment got cut off over there:
you want the line of code in the script that involves "document.artpic.src=..."
artpic is the name of an img i have over on the right side of the document. you can use onclick, onmouseover, whatever you want
- stupidresponse0
if you care about your page degrading gracefully and still working in the absense of javascript, I would look into using jQuery to implement this behaviour
- ninjasavant0
Let me expand on the dreamweaver thing. You can give an image an instance name or ID or whatever and then create a link that changes the image based on the name or ID.
- sv2rv0
Do you mean something like Lightbox? http://www.huddletogether.com/pr…
If it works for you, then I would appreciate that ffffound.com invite :)