body onload event not firing
I have this code in two different applications, it's supposed to hide a "Processing Request, Please Wait..." message.
VB Code:
<script>
function hideObject(obj)
{
if (ns4)
{
obj.visibility = "hide";
}
if (ie4 || upLevel)
{
obj.style.visibility = "hidden";
}
}
</script>
<body onload="hideObject(Processing);">
It works in one application, but not in another. I've tried putting an alert in the hideObject function in both applications, but it still only works in one application. Am I missing a setting or something??
This is driving me nuts.
Re: body onload event not firing
Instead of just Processing, send
hideObject(document.getElementById('Processing'));
Or, just send hideObject('Processing')
and set the var obj to getElementById in your function.
Re: body onload event not firing
Nope, still not working...I can't even get this to fire.
VB Code:
<body onload="javascript:alert('Testing');">
[color=red]Or[/color]
<body onload="alert('Testing');">
This has got me confused because, it works fine in another application, but not this one.
Re: body onload event not firing
can u post the aspx code for this...the HTML code.
Woka
Re: body onload event not firing
This will work in a regular .html page
Code:
<body onLoad="alert('test');">
But when I add the same code to a .aspx page within the VS.NET IDE, the onload event doesn't fire.
Code:
<body onload="alert('Test');">
Re: body onload event not firing
Do you have anything different on the page in question? Like extra page directives or different DTD declarations? This is quite odd, so I'm only venturing guesses.
Can you post the page?