Body element onload attribute with NETSCAPE

K

kw

I thought both browsers execute script not in a function on the body
load...but with NS7.1, it does not.

Therefore, to execute script in an NS browser client on the load of a page
from a ASP.NET Server Control, I want to modify the onload attribute to the
Body element to add an Initialize() function. For example: <body
onload="Initialize();">

However, this does not appear to be possible...or is it? Is there a
workaround to get script to execute automatically in NetScape?

Note: RegisterClientScriptBlock is used to create the Initialize()
script...but that won't cause it to be executed in NS even if it has script
no in a function statement.

Also, I tried doing something like this, but it doesn't work in NS either:
<script language="javascript" FOR=body EVENT=onload>Initialize();</SCRIPT>
and also
<script language="javascript" FOR=window EVENT=onload>Initialize();</SCRIPT>
 
K

kw

OMG, never mind. NS does in fact execute. The problem I had was that the
default settings weren't telling me that there was an error in the
javascript leaving me scratching my head because the same code worked in
IE...just that NS didn't do anything.

kw said:
I thought both browsers execute script not in a function on the body
load...but with NS7.1, it does not.

Therefore, to execute script in an NS browser client on the load of a page
from a ASP.NET Server Control, I want to modify the onload attribute to the
Body element to add an Initialize() function. For example: <body
onload="Initialize();">

However, this does not appear to be possible...or is it? Is there a
workaround to get script to execute automatically in NetScape?

Note: RegisterClientScriptBlock is used to create the Initialize()
script...but that won't cause it to be executed in NS even if it has script
no in a function statement.

Also, I tried doing something like this, but it doesn't work in NS either:
<script language="javascript" FOR=body
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top