×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Buggy JavaScript in Netscape 3.01

Buggy JavaScript in Netscape 3.01

Buggy JavaScript in Netscape 3.01

(OP)
I developed a client-sided JavaScript, which worked fine using Internet Explorer 4 and Netscape 4 browser, exception for Netscape 3.01.

The script function is to check whether a textbox contained anything typed-in or not. In Netscape 3.01, after data been typed in the textbox, when the script executed, it show that the textbox is empty, but executed again is fined!

Anyone got a clue or cure for this one?

TIA.

RE: Buggy JavaScript in Netscape 3.01

Can't tell without seeing the code itself. Do you have a sample?

RE: Buggy JavaScript in Netscape 3.01

(OP)
Here is it, it's been simplified:

<form method=post>
Company Logo :
<input type="file" name="LogoFileSpec" maxlength=50>
<p>
<input type="reset">
<input type="button" value="Submit" onClick="SubmitForm()">
</form>

<script language="JavaScript">
function SubmitForm()
{
if (document.forms[0].LogoFileSpec.value.length == 0)
{
alert('Please attach your company logo.');
document.forms[0].LogoFileSpec.focus();
}
else
{
document.forms[0].submit();
}
}
</script>

RE: Buggy JavaScript in Netscape 3.01

try using document.forms[0].elements[0].focus();

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close