Subscribe in a reader
I wrote a fairly simple JavaScript line to modify the size of an image when there is a OnMouseOver event. And then wrote a similar line of JavaScript to reduce the size back to normal on the OnMouseOut event. The only problem is the JavaScript didn't work on FireFox although it was great with Internet Explorer. After some research I found that using the 'this' object was needed with FireFox. So I adjusted my code to also have the events in the image object itself. Here is the code:
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" height="700px" width="215px">
<tr height="140px" width="195px" align="center">
<td><a href="AboutUs.aspx"
onmouseover="document.getElementById('AboutUs').style.width='205px'; document.getElementById('AboutUs').style.height='112px'"
onmouseout="document.getElementById('AboutUs').style.width='195px'; document.getElementById('AboutUs').style.height='105px'">
<img border="0" alt="About Us" src="/Images/Home/AboutUs.gif" style="height: 105px; width:195px; position: static;" id="AboutUs"
onmouseover="this.style.width='205px'; this.style.height='112px'"
onmouseout="this.style.width='195px'; this.style.height='105px'" />
</a></td></tr>
</table>
</div>
Latest technology news.
Amazing blog! Why can't you write for our blog :(.
Interesting idea and well implement but would it not be better to swap images instead, replacing the smaller one with a bigger one?<br><br>That way you'd not get any image quality issues with resizing.
So does this work on Firefox and IE?<br><br>If so it could be a neat solution.<br>
From my understanding it should work on both browsers
Thanks for the code. I've been having the same problem with firefox. Great work.
I am just looking for this, good post and thanks for the code.
Wow, Nice job. Maybe you can share a sample of your code or application of the javascript you made.<br><br>
Thanks, this was a real life saver for my mario flash games site :)
Thanks for providing the code.
Thanks for sharing the codes. I've been having the same problem when I'm using both Firefox and Internet explorer. I hope this time that both will work.
Good modification done.Hope it's working well now.
Awesome, I was trying to figure out how to do that and this worked like a charm!
thanks for the coder , i have saved the code for my work use :)
it's very nice, thanks for the code
Thanks for your code.
Thanks for sharing the code
Great thanks for such a useful information as that one!<br>Grateful a lot!