Results 1 to 2 of 2

Thread: focus on a button

  1. #1

    Thread Starter
    Addicted Member KingSatan's Avatar
    Join Date
    Feb 2006
    Posts
    185

    focus on a button

    i dont know if this is in my code or in asp or a bug or what...

    but i have this web form
    the admin side looks like this



    but everything is good (finally) except when u click a text box the button has focus..... so if you click one of the botttem "add new" text boxes, and hit enter it calls the top "addnew" button.click.... but still if u click one of the top textboxes and hit enter then the top button still clicks....

    know what i mean?

    its irritating...

    is there a way to disable enter while in the textboxes? or something more simple to resolve this little annoyance?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: focus on a button

    I think you've probably put the controls all in the same form. The Enter key triggers the submission of a form. Hence, you cannot have multiple submission buttons; you must place each section in its own form.


    By the way, for future reference, you'll get a quicker response in the ASP.NET section, which is where all web-related questions should go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width