Results 1 to 6 of 6

Thread: problem while pressing ENTER on a web page.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    india
    Posts
    273

    problem while pressing ENTER on a web page.

    Dear All,
    I have V2 2005 Framework 2.0, On a web page I have 1 textbox and 5 button on my page, and it has TabIndex from 1...7 respectively of pressing ENTER outside of a texbox and a button it called Click event of a button who has tabindex 3 and this button is placed on top left side of a page. Is anyone know why is it happened? and How to avoid this.

    help is highly appreciated..

    Regards,
    PPCC

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: problem while pressing ENTER on a web page.

    Hey,

    What do you want to happen when you hit enter? Anything, or nothing?

    An ASP.Net Form has the concept of a DefaultButton, which is the button that is called when the enter button is pressed. What is this property set to for your web application?

    Gary

  3. #3
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: problem while pressing ENTER on a web page.

    help is highly appreciated..
    your feedback highly appreciated..

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: problem while pressing ENTER on a web page.

    Hey PPCC,

    Did this work for you? If not, can you describe exactly what you are trying to achieve, and I am sure we will be able to help you.

    Gary

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    india
    Posts
    273

    Re: problem while pressing ENTER on a web page.

    I have done like tis
    <body onkeypress="window.event.keyCode = 0;" />
    it worked.
    Big TX

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: problem while pressing ENTER on a web page.

    Hey,

    I am glad to hear that you got it working, but to me this sounds like a little bit of a hack.

    You are essentially preventing the user for actually pressing any buttons, as this will always be overwritten with a 0. Is this actually what you want?

    If so, then can you please mark your thread as resolved.

    Gary

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