bboyle18
06-07-2006, 01:15 AM
Hey,
I have the following function:
headingClicked: function() {
alert(window.event);
//Delay the execution of this function by 1 second.
setTimeout(function() { var that = standardistaTableSorting.that;
alert(window.event);
var linkEl = getEventTarget(window.event);
.....// futher processing
}, 1000);
window.event holds the details of my current event. When I first call an alert on it it tells me that there is an object there. However, after I enter the function in the setTimeout() the window.event is null.
Does anybody know why window.event would lose its value in the setTimeout() function? Is there anyway I can keep its value so I can use it?
Hope someone can help,
Thanks
Chris
I have the following function:
headingClicked: function() {
alert(window.event);
//Delay the execution of this function by 1 second.
setTimeout(function() { var that = standardistaTableSorting.that;
alert(window.event);
var linkEl = getEventTarget(window.event);
.....// futher processing
}, 1000);
window.event holds the details of my current event. When I first call an alert on it it tells me that there is an object there. However, after I enter the function in the setTimeout() the window.event is null.
Does anybody know why window.event would lose its value in the setTimeout() function? Is there anyway I can keep its value so I can use it?
Hope someone can help,
Thanks
Chris