|
-
Oct 22nd, 2009, 10:51 PM
#1
Thread Starter
Hyperactive Member
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
-
Oct 23rd, 2009, 01:49 AM
#2
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
-
Oct 24th, 2009, 05:39 AM
#3
Hyperactive Member
Re: problem while pressing ENTER on a web page.
help is highly appreciated..
your feedback highly appreciated..
-
Oct 24th, 2009, 08:59 AM
#4
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
-
Oct 25th, 2009, 04:45 AM
#5
Thread Starter
Hyperactive Member
Re: problem while pressing ENTER on a web page.
I have done like tis
<body onkeypress="window.event.keyCode = 0;" />
it worked.
Big TX
-
Oct 25th, 2009, 10:20 AM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|