Simple javascript for netscape 4x

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>
 
S

Steven Cheng[MSFT]

M

moondaddy

Thanks, I havent had a chance to try it out yet, but the resource looks very
useful.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top