M
moondaddy
I need to get some simple scirpt to run in netscape 4x. I tested it in 4.73
and mozilla 1.0 which should be nescape 5.0. My problem is how do I
reference a textbox and set its value.
function testclick() does run as I can see the msgbox, but it fails to set a
value into the texbox. Any good ideas?
Here's a simple test page:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="javascript">
function window_onload()
{
window.setInterval("updateTime()",1000);
}
function updateTime()
{
var nowTime = new Date();
document.Form1.Text1.value=nowTime.getSeconds() ;
}
function testclick()
{
alert("xx")
document.Form1.Text2.value="xxxx";
}
</SCRIPT>
</HEAD>
<BODY LANGUAGE="JavaScript" onload="return window_onload()">
<FORM NAME="form1" ID="Form1">
<P><br>
<INPUT id="Button1" type="button" value="Button" name="Button1"
onclick="testclick()"><br>
<INPUT id="Text1" type="text" name="Text1"><br>
<INPUT id="Text2" type="text" name="Text2">
</P>
</FORM>
</BODY>
</HTML>
and mozilla 1.0 which should be nescape 5.0. My problem is how do I
reference a textbox and set its value.
function testclick() does run as I can see the msgbox, but it fails to set a
value into the texbox. Any good ideas?
Here's a simple test page:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="javascript">
function window_onload()
{
window.setInterval("updateTime()",1000);
}
function updateTime()
{
var nowTime = new Date();
document.Form1.Text1.value=nowTime.getSeconds() ;
}
function testclick()
{
alert("xx")
document.Form1.Text2.value="xxxx";
}
</SCRIPT>
</HEAD>
<BODY LANGUAGE="JavaScript" onload="return window_onload()">
<FORM NAME="form1" ID="Form1">
<P><br>
<INPUT id="Button1" type="button" value="Button" name="Button1"
onclick="testclick()"><br>
<INPUT id="Text1" type="text" name="Text1"><br>
<INPUT id="Text2" type="text" name="Text2">
</P>
</FORM>
</BODY>
</HTML>