By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

Simple javascript for netscape 4x

P: n/a
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>

--
mo*******@nospam.com
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
document.forms[0].Text2.value="xxxx";

-Jason

moondaddy wrote:
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>

Nov 18 '05 #2

P: n/a
Hi Moondaddy,

I think you can have a try on Jason's suggestion. Also here is a weblink to
the javascript reference on different versions:

#JavaScript for language learning
http://www.iei.uiuc.edu/JS4LL/resources.html

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3

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

--
mo*******@nospam.com
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:7S**************@cpmsftngxa10.phx.gbl...
Hi Moondaddy,

I think you can have a try on Jason's suggestion. Also here is a weblink to the javascript reference on different versions:

#JavaScript for language learning
http://www.iei.uiuc.edu/JS4LL/resources.html

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4

P: n/a
Hi Moondaddy,

Thanks for the followup. If you have any new findings or need any help,
please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.