View Full Version : Having problems with "onLoad"?
12-02-2005, 11:56 PM
I have no idea why the following code does not work in Explorer. It works okay in Firefox. In Explorer, the text box is blank. The onload function seems to not be executed since it is not displaying the value.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
document.userForm.sInit_Text.value = "Text Here";
<body bgcolor="#CCCCCC" text="#000000" onLoad="fnLoadSetup()">
<form name="userForm" method="post" action="">
<input type="text" name="sInit_Text" readonly>
12-03-2005, 12:06 AM
You could give the text box an ID -
<input type="text" name="sInit_Text" id="sInit_Text" readonly>
And see if that helps?
12-03-2005, 12:11 AM
That didn't work. This code works okay when I run it through my webserver in an asp file however it doesn't work as an html file.
12-03-2005, 12:15 AM
<input type="text" value="Text Here" name="sInit_Text" readonly>
12-03-2005, 01:35 AM
It is working now. Thanks again for your help!!!
12-03-2005, 01:42 AM
No prob, are you running these offline to test by the way? Because instead of changing the security level you could try unticking the box Tools>Internet Options>Advanced>Security>Allow active content to run in files on My Computer.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.