redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

valifating a number onchange



 
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
Koplaf



Joined: 28 May 2006
Posts: 130
Can i validate a number onchange?
  Reply with quote


Kopilman



Joined: 25 May 2006
Posts: 162
Koplaf, in a text box?
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
I wanna do something like onchange="javascript:if(isNaN(parseInt(document.form.input.value, 10))) {alert"Not a number";};"
And it doesn't work :(
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
Koplaf, onchange = javascript
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
Yup, text box
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
You dont need the javascript: there
And you can replace document.form.input.value with this.value
  Reply with quote
Koplaf



Joined: 28 May 2006
Posts: 130
<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
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group