trend Posted June 18, 2006 Posted June 18, 2006 I have 1 form, with 2 sets of information: Billing Address <submit button> Credit Card Information <Submit Button> When a user presses the enter button after typing something, the first <submit button> is automatically used. How can I make it so.. if the user is typing in credit card info, and he hits enter.. the <submit button> for CC info will be submited instead of the other? thanks! Quote
Arch4ngel Posted June 19, 2006 Posted June 19, 2006 Complex problem/ Simple Solution. Instead of having 2 submit... keep only 1. Put a radiobutton to let the user fill the right section. Base yourself upon that radio button to process either one of those. This is it :) The KISS again :) (Keep It Simple Stupid) Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
bri189a Posted June 22, 2006 Posted June 22, 2006 You could also use javascript to look for character 13 on key press of the field and manually click that button to keep your seperation of concerns, or make it so that the form doesn't automatically submit when you press character 13 (the return key). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.