Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Globalizing an event in IE.

Status
Not open for further replies.

Deleted

Technical User
Jul 17, 2003
470
US
I really hate IE.. Their support of the DOM truely sucks.

Trying to globalize the window.event so I can keep the functions seperate from each other. Anyone know why this doesn't work? or a CLEAN solution?

Code:
<script type="text/javascript">
//<![CDATA[ load the calendar using the XML object
var evt;

function loadXMLDoc(event, url) {
    evt = event || window.event;

    processReqChange();
}

function processReqChange() {
    getMousePos();
}

function getMousePos() {
    var posX   = 0;
    var posY   = 0;
    var offset = 5;

    alert(evt.clientX);

    if (document.all) { // ie. support sucks my balls
        posX = evt.clientX + document.body.scrollLeft;
        posY = evt.clientY + document.body.scrollTop;
    }
    else {
        posX = evt.pageX;
        posY = evt.pageY;
    }
}
//]]>
</script>

 
This would also help.. It's called using

Code:
<input type="button" value="Open Calendar" on
Click="loadXMLDoc(event, 'admin.pl?do=calendar&fwd=0')">

This works in everything but IE. IE is worthless!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top