I hope I'm posting this in the correct location, this is the best place I could think to post it.
I have a script in a file called scripts.js
The script is:
I have an image set up to show a div tag when moused over, and the divtag goes away on mouse out.Code:function detailOver(d) { var IE = document.all?true:false var tempX = 0; var tempY = 0; var id = d; var div = document.getElementById(id); if (IE) { // grab the x-y pos.s if browser is IE tempX = event.clientX + document.body.scrollLeft; tempY = event.clientY + document.body.scrollTop; } else { // grab the x-y pos.s if browser is NS tempX = e.pageX; tempY = e.pageY; } if (tempX < 0){tempX = 0} if (tempY < 0){tempY = 0} div.style.left=event.clientX+10+"px"; div.style.top=event.clientY+10+"px"; div.className = "um-hover"; } function detailOut(d) { var id = d; var div = document.getElementById(id); div.className = "um"; }
and the div tag is:Code:<img src="images/question.png" alt="" onmouseover="detailOver('plans');" onmouseout="detailOut('plans');">
This is working flawlessly in Internet Explorer but it doesn't even appear to load in Firefox - even when I put a blatant error in the script I get no errors in FireFox (I do however get the errors in IE). I'm calling the code withCode:<div class="um" id="plans" style=" style="z-index: 100;"> <h4 id="popuptitle">Plans</h4> <p id="popupcontent">Information here!</p> </div>Either it's not loading, or for some reason the onmousenter onmouse out are not working in firefox.Code:<script language="javascript" type="text/javascript" src="scripts.js"></script>
Any help is appreciated. Thank you.
Michael



Reply With Quote



Bookmarks