Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numbers and strings
Message
 
À
31/10/2003 13:04:24
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Divers
Thread ID:
00845043
Message ID:
00845723
Vues:
15
i have this code

if (document.login.eng_name.value=="0")
alert("You did not select an Engineer")
return false ;

as i am hoping to catch simple errors before the information
is sent to the server but after running the javascript the page
goes to the server anyway. is there any way to stop the page
going to the server if the javascript return false?
Slán
~M

>>hi,
>>this is a q about java script and asp pages, kinda. i want to take in info in an asp page and then use it later, the only thing is that it really needs to be numeric as i have to add the info together. if you put in chars then the addition fails. how can i check to make sure that the entries in the fields are numeric, i think that it can be done in java script but am not too sure if this will fit in with vbscript on asp. any idea would be appreciated.
>>Cheers
>>~M
>
>create new Number vars based on the values entered and use those for calcs, e.g.
>
// js code assuming parameters already received, e.g., numberParm1, numberParm2, etc.
>var useNumber1 = new Number(numberParm1)
>var useNumber2 = new Number(numberParm2)
>
Go raibh maith agat

~M
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform