OK, I have the following javascript functions:
var TimerID = null;
function onMouseOverHandler(oPopup) {
if (TimerID) {
clearTimeout(TimerID);
}
TimerID = setTimeout(" + oPopup + ", 1500);
}
function onMouseOutHandler() {
if (TimerID) {
clearTimeout(TimerID);
}
// set visibility to hidden
}
I then set the calls up for the function as (server side c# code):
....
{
sPopup = "showtrail('" + sPicPath2 + "','" +
oPic.Title + "','" + oPic.ScreenName + "','" + oPic.TotalComments +
"','" + oPic.Votes + "', '" + oPic.CategoryName + "','1',240,1)";
}
else
{
sPopup = "showtrail('" + sNotFound + "','***
PREVIEW NOT AVAILABLE ***','" + oPic.ScreenName + "','" +
oPic.TotalComments + "','" + oPic.Votes + "', '" + oPic.CategoryName +
"','1',240,1)";
}
string sClose = "hidetrail()";
oImage2.Attributes["onmouseover"] =
"onMouseOverHandler(" + sPopup + ")";
oImage2.Attributes["onmouseout"] =
"onMouseOutHandler(" + sClose + ")";
....
when the onmouseover event fires and calls the onMouseOverHandler, the
oPopup param shows as undefined. What am I missing?
Any help appreciated!
thanks