Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: JavaScript IE 9 error on mouseover

$
0
0
Re: JavaScript IE 9 error on mouseover
HTML, CSS, JavaScript, Flash
Re: JavaScript IE 9 error on mouseover
02/08/2012
09:26:24 AM
3FF0K8H5V Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None

I'm not familiar with jQuery but I will look into it.

If you are writing javascript code you should definitely check it out. There's a learning curve involved but it will be worth the effort, IMO. One of its strengths is dealing with these types of incompatibilities across different browsers.

That because onmouseover fires for child elements so you may get events fired for elements other than the element you defined the onmouseover on.

I'd recommend you look into something like jQuery to handle the element filtering more cleanly and just give you the events on the elements you're actually monitoring.

+++ Rick ---


Below is the code that is giving me an issue in IE 9. I believe it is the onmouseover becuase when I mouse over the generated popup, I get an invalid argument error.

<script language='JavaScript'> var oPopup = window.createPopup(); function ShowPopup(tRailCar, tRailShip) { var cRailHistory = "wc.dll?IclRailHistory~InfoMain~&" + "lcSession=" + document.frmVars.cSession.value + "&lcTrans=" + document.frmVars.cTrans.value + "&lcRailCar=" + tRailCar + "&lcDate=" + tRailShip; var cVINsummary = "wc.dll?IclVinSummary~InfoMain~&" + "lcSession=" + document.frmVars.cSession.value + "&lcTrans=" + document.frmVars.cTrans.value + "&lcRailCar=" + tRailCar + "&lcDate=" + tRailShip; var cMenu1 = "<DIV style=\"cursor:hand; font-family:Arial; font-Size:11px; Color:800000; margin-left:5px; margin-right:10px; background:CCCFEC;\"" + "onmouseover=\"this.style.background='9999EE';\"" + "onmouseout=\"this.style.background='CCCFEC';\">" + "<SPAN onclick=parent.location.href='" + cVINsummary+ "'>" + "VIN Summary</SPAN>" + "</DIV>"; var cMenu2 = "<DIV style=\"cursor:hand; font-family:Arial; font-Size:11px; Color:800000; margin-left:5px; margin-right:10px; background:CCCFEC;\"" + "onmouseover=\"this.style.background='9999EE';\"" + "onmouseout=\"this.style.background='CCCFEC';\" >" + "<SPAN onclick=parent.location.href='" + cRailHistory + "'>" + "Railcar History</SPAN>" + "</DIV>"; oPopup.document.body.innerHTML = cMenu1 + cMenu2; var lefter = 10; var topper = 15; oPopup.show(lefter, topper, 95, 30, event.srcElement); } // ShowPopup() </script>

Dan


Viewing all articles
Browse latest Browse all 10393

Trending Articles