On Sun, 08 Jan 2006 23:38:44 -0500, Randy Webb
<Hi************@aol.com> wrote:
dr*****@swbell.net said the following on 1/8/2006 11:23 PM: Hello,
I'm trying to change the onmouseover event dynamically.
This sets-up the initial onmouseover event:
<a href="home.html"> <img border="0" id="img22"
src="images/home1.jpg" height="15" width="85" alt="Home"
onmouseover="FP_swapImg(1,0,/*id*/'img22',/*url*/'images/home2.jpg')"</a>
Is FP_swapImg a Front Page generated function?
If all you are wanting to do is change the onmouseover then reset it:
onmouseover="this.src='images/home2.jpg';this.onmouseover=null"
If you are intent on using the FP function then you have the id of the
image, you can set its onmouseover to null there:
function FP_swapImg(p1,p2,imageID,imageNewSrc){
//existing code
document.getElementById(imageID).onmouseover = null;
}
Thanks for the info. It did the trick.
I uses this line for IE to work correctly:
document.getElementById(imageID).onmouseover = null;
And used this line for Mozilla to work to correctly:
document.write ('<div id="imageID" onmouseover=null>');
I'm not sure why. Differences in the browsers I presume. But I've got
it working now.
Does anyone have any recommendations on good documentation (web sites,
books, etc.) that discribes the document and object properties. I
spend a lot of time trying to find a particular property for an object
or document. I've got a few properties figured out, but a good
document sure would be nice.
Have a good nite,
Richard