Image Mouseover without java!

[Archive from my old Blog]
Tuesday, December 16, 2008

Image Mouseover without java!

I used to use a website that prohibited the use of any kind of java as well as iframes. It also was very limited in terms of using css because you could not access any of the raw html files and everything input into the site passed through a filter to prevent abuse. All I wanted was to have mouseovers! well I found a way on my own after having no luck in any web help forums – yeah I was just as surprised!

When I told people I wanted to have mouseovers with no css or java script they told me it wasn’t possible, well here is the code I made that worked 🙂

<IMG SRC=”images/image_1.gif” ALT=”Text Description” WIDTH=88 HEIGHT=42 border=”0″ id=”msg”
onmouseover=”document.getElementById(‘msg’).src=’rollovers/image_2.gif'” ALT=”Text Description” WIDTH=88 HEIGHT=42 border=”0″
onmouseout=”document.getElementById(‘msg’).src=’images/image_1.gif'” ALT=”Text Description” WIDTH=88 HEIGHT=42 border=”0″>

 

Update: Here is a shorter method I wrote up.

<img alt=”Image” src=”focus2.jpg” onMouseOver=”src=’focus1.jpg'” onMouseOut=”src=’focus2.jpg'”>

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s