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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple test for numeric input 1

Status
Not open for further replies.

tester321

Programmer
Mar 13, 2007
150
CA
Grrr. very late over here, can seem to get these 2 simple things going.... please help, thanks

[1]
onchange="var nhp=^\d+$; if (!nhp.test(this.value)){alert('....

[2]
onchange="this.value=this.value.toUpperCase();var ReExp = /^[A-Z][0-9][A-Z]$/i;if (!ReExp.test(this.value)){alert('The first 3 characters of the Postal Codes have the following format L8L....

Thank you very much!
 
[1]
>onchange="var nhp=^\d+$; if (!nhp.test(this.value)){alert('....
[tt]onchange="var nhp=[red]/[/red]^\d+$[red]/[/red]; if (!nhp.test(this.value)){alert('....[/tt]
[2]
>onchange="this.value=this.value.toUpperCase();var ReExp = /^[A-Z][0-9][A-Z]$/i;if (!ReExp.test(this.value)){alert('The first 3 characters of the Postal Codes have the following format L8L....
[tt]onchange="this.value=this.value.toUpperCase();var ReExp = /^[A-Z][0-9][A-Z[highlight]]/[/highlight]i;if (!ReExp.test(this.value)){alert('The first 3 characters of the Postal Codes have the following format L8L....[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top