Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling javascript function through onload

Status
Not open for further replies.

ashpassword

Programmer
Jun 19, 2002
19
IN
Hi,
I am facing problem in calling my javascript function through onload of the body as it works fine in IE but giving problem in Netscape 6.
Through any other mean like button click it is being called and working.
For onload call I have written as follows:
<body topmargin=&quot;1&quot; leftmargin=&quot;1&quot; onLoad=&quot;forEnabledisable();&quot;>

If anyone have idea regarding this please help me out.
 
Try this out:
<script type=&quot;text/javascript&quot;>
window.onload = forEnabledisable;
</script>
</head>
<body> Cheers
Keith
Administrator - javascriptcity.com
 
this works fine for me in NS 6:

<body onLoad=&quot;alert('hi')&quot;>

can you show your code for forEnabledisable()? ======================================

if (!succeed) try++
-jeff
 
function forEnableDisable()
{
var objForm=document.reports;
var lsDesValue=objForm.cmbDesFormat.value;
if(lsDesValue==&quot;PDF&quot;)
{
objForm.btnPrintReport.disabled=true;
}
else
{
objForm.btnPrintReport.disabled=false;
}
return true;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top