aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes validation for each button 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 for each button" Watch "validation for each button" New topic
Author

validation for each button

prathimaprasun rao
Ranch Hand

Joined: Jun 29, 2006
Posts: 55
hello everyone,
I have three fields namely - sno, sname and class.

sno and sname are the text fields where as class is a list box with values from 1 to 10.

i have four buttons below these three fields.They are Add, Modify, Update and Remove.

there is a text area below these four buttons.

when i enter data into those three fields and click add, all the data will be displayed in the text area.when i select data from that text area and click modify the data will be populated from the textarea into the corresponding fields.when i click update, the data from those fields will be vanished and the fields will be empty.

now i need to write a validation so that these fields are not blank and display an alert whenever i click add or update buttons.

input type="button" value="Add" onClick
input type="button" value="Modify" onClick
input type="button" value="Update" onClick
input type="button" value="Remove" onClick

I think i need to write the logic for this validation below the value ="add" and value ="Update".
[ July 23, 2007: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Regd:validation for each button

Please use only real words when posting to the forums. "regd" is not a word, and I have no idea what is intended to mean.

Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Is there a server round-trip that occurs whenever one of these buttons is pressed, or is all this happening on the client?
prathimaprasun rao
Ranch Hand

Joined: Jun 29, 2006
Posts: 55
All this is happening at the client side.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Then you'll need to handle all of this in JavaScript. This post is appropriately moved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validation for each button