xWhYxSOxSeRIoUSx Posted July 28, 2008 Share Posted July 28, 2008 Hey Everyone, I am new here as well as a new coder. I'm still learning some new languages and need some help with something. I was wondering if anyone knew how to code a script that allowed an image to change into another image when clicked. (for example, Lets say your on a forum. You just received a new message and the "Message" image in the header is blinking. Allowing you to know you have a new message. As soon as you click it, The "Message" image in the header goes back to normal.) Does anyone know how you would code that script? I'm really stuck here. Thanks, Kevin Link to comment https://forums.phpfreaks.com/topic/116928-question/ Share on other sites More sharing options...
corbin Posted July 28, 2008 Share Posted July 28, 2008 http://www.google.com/search?hl=en&safe=off&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=javascript+change+an+image+src Wow, that was hard! Anyway, now that I'm done being mean: <img src="blah.bleh" onclick="this.src='other.bleh';" /> And the src change could of course be wrapped in a function. Link to comment https://forums.phpfreaks.com/topic/116928-question/#findComment-601302 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.