html question?

Message Bookmarked
Bookmark Removed
I have an image on a page that I need load another image in the same spot on the same page when clicked?

wordy rappinghood (roxymuzak), Monday, 6 November 2006 23:15 (nineteen years ago)

I actually understood that. It's probably really simple, but I never figured out how to do it.

Pleasant Plains /// (Pleasant Plains ///), Monday, 6 November 2006 23:20 (nineteen years ago)

I would like everyone to know that this was posted by my room-mate. NOT me. He has already apologized.

wordy rappinghood (roxymuzak), Monday, 6 November 2006 23:22 (nineteen years ago)

Click meeeee:
http://www.acc.umu.se/~zqad/cats/1139368663219.jpg


Replace the square brackets with html brackets, and replace 'supercatURL' and 'blanketcatURL' with the URL's of your pictures:

[a href=blanketcatURL][img src=supercatURL][/a]

King-a-Ling (King-a-Ling), Monday, 6 November 2006 23:27 (nineteen years ago)

"in the same spot on the same page"

Curt1s St3ph3ns, Monday, 6 November 2006 23:29 (nineteen years ago)

No wait, that doesn't work because it links you to another page :-(

King-a-Ling (King-a-Ling), Monday, 6 November 2006 23:29 (nineteen years ago)

king-a-ling my impression is that he wants the image to change "in place" on the page, not link to a new page

this should work, roxy - your roommate should cut and paste the code in the page below into a new document, save it as a text file called whatever.html, and change the image paths to match the images he's working with

http://www.devx.com/tips/Tip/13653

Euai Kapaui (tracerhand), Monday, 6 November 2006 23:30 (nineteen years ago)

If you want it to load on the exact same spot on the page you'll need to use Javascript or Flash.

polyphonic (polyphonic), Monday, 6 November 2006 23:30 (nineteen years ago)

it's a rollover but with a click rather than a rollover.

replace square brackets with triangular ones

[a href="#void(document.getElementById('image').src='two.png')"][img id="image" height="256" width="256" src="one.
png" border="0"/][/a]

http://www.koogy.clara.net/clickme/

Koogy Yonderboy (koogs), Tuesday, 7 November 2006 09:57 (nineteen years ago)

(depending on image size it might be an idea to preload the substitute to make the switchover a bit quicker)

um, the text box appears to have mangled my response. the hash should be the word 'javascript' and a colon. see web page source.

Koogy Yonderboy (koogs), Tuesday, 7 November 2006 09:59 (nineteen years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.