This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Strange Problem with netscape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Strange Problem with netscape" Watch "Strange Problem with netscape" New topic
Author

Strange Problem with netscape

madhav lakkhani
Greenhorn

Joined: Jun 04, 2002
Posts: 12
Hi this is a code
function digit()
{
for(ic=1;ic<=124;ic++)
{
s=Form.elements[ic].value;
s1=Form.elements[ic].name;
r=/^[0-9]{1,}.?[0-9]*$/;
if(!(r.test(s)))
{
alert("enter valid data");
Form.elements[ic].focus();
Form.elements[ic].value="0";
return false;
}
}
}

Hi Iam using this code to check an entry by user is it valid or not..
it works cool with IE and
No response from Netscape..
if i change it to
s=Form.fieldname.value;
it works cool ..
Problem is this Iam having more than 50 fields and it is not possible to write for all..
field like this..
any soln appreciated .
Iwant to use it in netscape 4.1 and higher
version
thx in advance
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
The onlu thing that come to my mind that if "Form" is a name of your form, use document.Form or document.forms["Form"].
I remember something funny with NS4.7 about this.
madhav lakkhani
Greenhorn

Joined: Jun 04, 2002
Posts: 12
Hi thx for answer..
but Iam using document.form.filedname.value..
than also not working
strange..
any suggestion...
thx
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Strange Problem with netscape