Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

ASP.NET 2 Enter Key and master page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Madison - 23 Oct 2007 23:08 GMT
Hi there,

I'm using framework 2 and web site application with master page and more
than 30 pages used master. I have users come from desktop application who
like to hit Enter every time they entered some things in the textbox. I would
like to disable the Enter Key for this application. Any ideas how to disable
enter key for the whole application.

Thanks.
Nail - 24 Oct 2007 11:35 GMT
Add following attribute to the BODY tag of the masterpage:

onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}"

You should get something like this:

<body onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}">
...
</body>

It will change ENTER key behavoiur - it will work as TAB key.
Signature

Nail
[MCPD: WEB]

Madison - 24 Oct 2007 13:54 GMT
Hi Nail,

Thank you very much. It's working beautiful.

Madison

> Add following attribute to the BODY tag of the masterpage:
>
[quoted text clipped - 7 lines]
>
> It will change ENTER key behavoiur - it will work as TAB key.
darrel - 24 Oct 2007 22:03 GMT
> Thank you very much. It's working beautiful.

But that's a horrible solution.

Enter = form submit is a basic function of a web browser. This isn't an
application issue, it's a user training issue.

Disabling the enter key may placate the uneducated users, but it's going to
infuriate any power user and also makes your site that more inaccessible.

-Darrel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.