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 / .NET Framework / Scripting / November 2005

Tip: Looking for answers? Try searching our database.

On Key Press

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Moore - 01 Nov 2005 17:01 GMT
We are using the "onkeypress" event in Javascript to determine when
the user hits a particular key. This works well unless an ASP.NET
control (such as a textbox) has focus. In this case the onkeypress
event does not fire. Unfortunately, our need is to handle key presses
when a control does have focus, so we are kind of stuck right now.

My question is are we approaching this in the correct way? Is there
a better way to do this?
.net noobie - 11 Nov 2005 23:41 GMT
i think u will need to add a javascript call to the asp.net control

e.g. onclick="return myJsMethod();"

in the myJsMethod();

u need to return "false" if u do not want to do a asp.net postback
and "true" if u do want to postback to occur.

> We are using the "onkeypress" event in Javascript to determine when
> the user hits a particular key. This works well unless an ASP.NET
[quoted text clipped - 4 lines]
> My question is are we approaching this in the correct way? Is there
> a better way to do this?

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.