aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Validation of Forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Validation of Forms" Watch "Validation of Forms" New topic
Author

Validation of Forms

Paddy Joshi
Greenhorn

Joined: Oct 13, 2010
Posts: 10
Hi,
I want to validate a form. In which i need to validate if user entered text where number is required. i come to know about isNaN () method. but it will validate floating numbers also and i want integers only. moreover how can i enable a text input only when checkbox is enabled
what i did was ( for number validation)


please help me with this ... thnks in advance ...
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 532

You can try using regular expressions..
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 532

Paddy Joshi wrote:how can i enable a text input only when checkbox is enabled

On click of the checkbox, call one function, based on the value you get from checkbox(whether its checked or unchecked), enable/disable a text box. What difficulty are you facing here?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

your logic looks fine for me except .(dot) in your string . remove that!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation of Forms