2 buttons and 2 panels

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
I have a panel and one "add" button. When user clicks on
the Add button, i hide one panel and display the other panel. The second panel displayed has text fields on it where users enter info and click the add button again and save to database.

Well, if I have ONE "add" button with the hide/unhide panel AND the insert code, code just keeps on going and adds a blank row to the table, then displays the text fields.

so this is what i did I created TWO add buttons. One is when the user clicks and it hides/unhides the panel. The second "add" button actually saves to the database.

Any other way of having only 1 add button to perfom the 2 functions: hide/unhide and save to DB only when user has actually entered data in the text fields?
 
Back
Top