12-02-2005, 10: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-02-2005, 11:06 PM
You could give the text box an ID -
<input type="text" name="sInit_Text" id="sInit_Text" readonly>
And see if that helps?
12-02-2005, 11:11 PM
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-02-2005, 11:15 PM
<input type="text" value="Text Here" name="sInit_Text" readonly>
12-03-2005, 12:35 AM
It is working now. Thanks again for your help!!!
12-03-2005, 12: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.