This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Consider Paul's rocket mass heater.
 
subject: Strange Problem with netscape
 
Similar Threads
question 2
regex'ing a date
passing string object in to a method...
why the window doesn't close and bring the item to the main form?
Why doesn't this match?