|
-
Nov 25th, 2005, 05:42 PM
#1
Thread Starter
Frenzied Member
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.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Nov 26th, 2005, 09:25 AM
#2
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.
-
Nov 28th, 2005, 11:53 AM
#3
Thread Starter
Frenzied Member
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.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Nov 28th, 2005, 12:17 PM
#4
Re: body onload event not firing
can u post the aspx code for this...the HTML code.
Woka
-
Nov 28th, 2005, 03:07 PM
#5
Thread Starter
Frenzied Member
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');">
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Nov 29th, 2005, 09:26 AM
#6
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|