473,762 Members | 7,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Activate server event with javascript

Hi

I have the following scenario: one needs to confirm his password to authorize some operation. In the page, there's a brief of the operation, one asp:textbox and three asp:imagebutton (authorize, cancel operation and close window). The problem is that the enter key, when pressed on the textbox, caused a postback, and it would be annoying to some of our clients. Then, I inserted some javascript to ignore the pressing of the enter key, and it works fine, but now they are complaining that they have or to click the button or to press tab and then enter
So, my question is: is there any way of binding the press of the enter key on the textbox to a specific event (in this case, the authorize button)?

Thanks in advance for any help

Marcelo
Nov 18 '05 #1
1 2815
Well, you can individually trap the onKeyDown event in each of the text
boxes, and then selectively take action (form.submit()) or do nothing
depending on what text box you are sitting in at the time.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"marcelo" <an*******@disc ussions.microso ft.com> wrote in message
news:6F******** *************** ***********@mic rosoft.com...
Hi,

I have the following scenario: one needs to confirm his password to
authorize some operation. In the page, there's a brief of the operation,
one asp:textbox and three asp:imagebutton (authorize, cancel operation and
close window). The problem is that the enter key, when pressed on the
textbox, caused a postback, and it would be annoying to some of our
clients. Then, I inserted some javascript to ignore the pressing of the
enter key, and it works fine, but now they are complaining that they have
or to click the button or to press tab and then enter.
So, my question is: is there any way of binding the press of the enter key
on the textbox to a specific event (in this case, the authorize button)??

Thanks in advance for any help,

Marcelo

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1431
by: Michel | last post by:
I like to show a inbetween selfmade menu when rightclicking the page. So on the first line I want to add "Default right-click menu". So first I need to capture it, then I need to stop the context-menu from showing up, then show a self designed pop-up menu and then I need to be able to activate the real client-site context-menu from this menu without clicking the right mouse button. Any idee welcome, thanks!
2
2026
by: Randy Harris | last post by:
I'm working with Access 2K and seem to be getting some behavior that contradicts the documentation. First, the help says: "Note The Activate event doesn't occur when a form receives focus back from a dialog box, popup, or another form." This doesn't seem to be the case. The form activate consistently fires when focus moves from another form. Secondly, the activate event for a report. I am seeing it fire consistently
1
2060
by: June Homer | last post by:
I have a form which has its activate event set to maximise the form. This used to work but no long does. I have put a breakpoint in the Activate event and it is never trapped. The form is opened from the frmSwitchboard (the start up form) with a simple DoCmd.openForm "formName". I did have the min/max buttons disabled but have changed them back to enabled in case this was an issue.
9
2562
by: MLH | last post by:
Say I open a form (MyForm) in design view, then I close it and dbl-click it in the database window to open it. Shouldn't the Activate event occur in all such situations? What might the case(s) be if the Activate event does NOT fire?
3
3514
by: active | last post by:
I remember when I checked NewGroups for comments about the VB6 Activate event and found that many thought it was not a reliable way to keep track of which form has focus. There was enough bad press that I avoided it. I now have a project with MDI child forms and non-MDI child forms coming and going as the user selects different options. I need to know which form is the active one and thought that I could use the Activate and Deactivate...
2
4797
by: dominic.martin | last post by:
Hi, I'm no javascript programmer but I found a really good piece of javascript at http://www.isdntek.com/tagbot/zipzoom.htm that magnifies areas of an image. It's just what I want but their example only allows for a button in the HTML body to turn the magnifier on: <input type="button" onclick="initMagnifier()" value="Use Magnifier"> I would like two buttons; one to activate the magnifier and one to
6
2528
by: den 2005 | last post by:
Hi everybody, Question 1: How do you set the values from server-side to a client-side control or how do you execute a javascript function without a button click event? Question 2: How do you get response from a Confirm() popup window to uncheck all server-side checkboxes placed in a panle of a web user control? I am using ASP.Net 2.0, Thanks. Need info...
4
5880
by: Ed | last post by:
I'm writing a VBA macro in Word 2003 that finds and manipulates a web page (Win XP, IE6 sp2). I am having trouble with a checkbox. I can find the checkbox and make it checked, but I can't figure out how to activate the function connected to the OnClick event. Would anyone be able to help me out here, please? Thanks. Ed
17
2971
by: happyse27 | last post by:
Hi All, The html page(see item a below) is calling javascript(item b below), but cant work as the page show blank. Not sure if the method of calling is wrong(in terms of default directory) or javascript is wrong. using 127.0.0.1/htmlscript.html below to call the java script embedded in the following html script. I am using apache server and apache server have error 304(not modified) Been trying many methods for past 1...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5268
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3914
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.