Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object MATH method isNAN

Status
Not open for further replies.

macmonteiro

Programmer
Oct 24, 2002
35
BR
Heloops....

I'm not a little used with JS 'math' object... Look at what we've been trying to do:

<!-- Begin
function verifica(form) {
if ((form.cad_nom.value == &quot;&quot;) || (isNAN(form.cad_nom.value))){
alert (&quot;Pleaz, ma'am, tell us your name.&quot;)
form.cad_nom.focus()
return (false)
}
--->
an so on...
why doesné it work?
 
javascript is case sesative.try this
(isNaN(form.cad_nom.value))){
A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
form is a keyword so I wouldn't use it as a variable name. Try substituting the form variable with another name.
 
hehe...
my submit: onClick=&quot;verifica(this.form)&quot;
so, I'm not supposed to have trouble with this
----------->

onpnt: no error msg with your code, but the numbers went on smooth through the function...
 
that would indicate that the value of the form is not being passed correctly.
place this in the function to see if you are validating a actual value
alert(form);

HellTel is very correct in form being a keyword and you should change all references to that word as you have it to something like frm. this may be the reason behind this not validating correctly A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
alert(form.cad_nom.value);
----------->returned the value correctly

and besides, all the other validations are working alright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top