473,508 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple javascript for netscape 4x

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
4 1081
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9533
by: cv | last post by:
Hi all, I have to copy two set of data from 2 files(notepad/excel) say, products and their corresponding prices to list/textarea/table. I should be able to retrieve the product and corresponding...
10
1899
by: Adrian | last post by:
Hi I want to write a form that when a user presses submit it carries out the submit action and then closes the browser or redirects to another page. The form CGI I'm using, Demon's does not...
14
2798
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different...
5
2213
by: kw | last post by:
Hello, I am trying to put up a page for my students for them to be able to enter their class number into a field and instantly get a personalized text message. (ie student number 5 enters "5"...
8
3623
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.