Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Posted

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)

"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

Posted
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).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...