473,379 Members | 1,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

captue enter button

Is it possible to capture the enter button and run a javascript function?

--
David
Jul 19 '05 #1
3 1803
This is an ASP group so it only really deals with server-side coding, not
client-side events.

But, yes, you can. Key code 13 is enter, iIrc.

Ray at work

"DaveF" <df*****@geodecisions.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Is it possible to capture the enter button and run a javascript function?

--
David

Jul 19 '05 #2
I am doing the following. It works in a single page, but when I try to run
it in a frameset, it does not. ?????
<Script language="JavaScript">
function checkEnterKey(event){
if (event != null) {
code = event.keyCode
alert(code)
}
}
</script>
<body onkeypress="testme(event)";>

--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
This is an ASP group so it only really deals with server-side coding, not
client-side events.

But, yes, you can. Key code 13 is enter, iIrc.

Ray at work

"DaveF" <df*****@geodecisions.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Is it possible to capture the enter button and run a javascript function?
--
David


Jul 19 '05 #3
Try inquiring in either a client-side scripting group, i.e.
m.p.scripting.jscript, or a browser group.

Ray at work

"DaveF" <df*****@geodecisions.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
I am doing the following. It works in a single page, but when I try to run
it in a frameset, it does not. ?????
<Script language="JavaScript">
function checkEnterKey(event){
if (event != null) {
code = event.keyCode
alert(code)
}
}
</script>
<body onkeypress="testme(event)";>

--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoint.com
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
This is an ASP group so it only really deals with server-side coding, not
client-side events.

But, yes, you can. Key code 13 is enter, iIrc.

Ray at work

"DaveF" <df*****@geodecisions.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
> Is it possible to capture the enter button and run a javascript function? >
> --
>
>
> David
>
>



Jul 19 '05 #4

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

Similar topics

15
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
5
by: Steve | last post by:
Hi, Is it possible to make hitting the enter key in an ASP textbox run the code behind an ASP button on a form? I have a search page which users tend to type in the query then just hit enter...
5
by: Eric | last post by:
Hi All, I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I...
5
by: ewillyb | last post by:
Hi, ASP.NET has some interesting behavior when the user hits the Enter key. If there are multiple ASP:Buttons (rendered as HTML submits) on the form, when the user hits enter, the first button's...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
10
by: john | last post by:
In a form I'm trying to make a search field to be able to quickly find a record on ID-number. User enters a number and presses enter to move to that record. How do I trap for the enter-keystroke...
4
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches....
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.