web hosting and development forums
Web Design and Development Forums Archive


Index - JavaScript forum

valifating a number onchange


Post reply

Can i validate a number onchange?
Koplaf, in a text box?
I wanna do something like onchange="javascript:if(isNaN(parseInt(document.form.input.value, 10))) {alert"Not a number";};" And it doesn't work :(
Koplaf, onchange = javascript
Yup, text box
You dont need the javascript: there And you can replace document.form.input.value with this.value
<td> <input type=text name="telefon" value="" size=20 onchange="if (isNan(parseInt(this.value, 10))) { alert('Help'); }" /> </td> Doesn't work My js should bring up an alert on input change




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com