[Javascript] how can I check to see if a text box has a number or a string in it???
Peter Brunone
peter at brunone.com
Thu Jun 13 19:05:21 CDT 2002
I believe you need to include the document in your object reference, i.e.
parent.TransDetail.document.myform.ClosingMonth.value
|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Scott.Wiseman
|
|Thanks Peter
|
|
|alert(parseInt(parent.TransDetail.myform.ClosingMonth.value));
|this gives me NaN
|
|
|both of these are not working...
|
|if( parseInt(parent.TransDetail.myform.ClosingMonth.value) == "NaN")
| {
| alert("You must select a Month");
| return false;
| }
|================== or ======================
|if( parseInt(parent.TransDetail.myform.ClosingMonth.value) == NaN)
| {
| alert("You must select a Month");
| return false;
| }
|
|this is not working
|
|what am I doing wrong?
|
More information about the Javascript
mailing list