473,385 Members | 1,693 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,385 software developers and data experts.

Detect the cursor location using javascript

hi all

i have 25 components which includes [textarea, textfile, radio, combo, etc...] and i have written a key event where i say that function, when "ENTER" is entered, i call a function which will submit the page. now my page is getting submitted when i press enter even in the textarea which should not be. so is there any that i can leave not to submit the page if its textarea. this happens only in IE7, 8. all the other browser its working.

can you help or suggest me on this
Oct 28 '09 #1
1 2064
gits
5,390 Expert Mod 4TB
for IE you could check the event's target (in IE it is srcElement) id like:

Expand|Select|Wrap|Line Numbers
  1. event.srcElement.id
kind regards
Oct 28 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mat | last post by:
How can I detect when a link has been clicked but the new page is still in the process of loading? The document.location.href property still displays the current location (understandably) not the...
12
by: Kevin Blount | last post by:
I'm playing with dragable <DIV>s, being inspired by google.com/ig, where you can move items on the page around and have items you move over change position if necessary. I have 3 div's setup,...
4
by: Sid S. | last post by:
How can I find the absolute cursor location? Where the mouse cursor is located with repect to the body. This way I can position an div tag where the mouse is, even if scrolled down farther on the...
2
by: Sam | last post by:
Hi, I can't figure out how to detect when my mouse cursor leaves a panel control. It should not trigger the event (or do anything) when the mouse leave the panel but still is over a control that...
9
by: Rich | last post by:
Please help. Looking for a script to detect and display what version of Windows a user is running. Thanks in advance. Rich
1
by: Jessica | last post by:
Hi, I'm sorry if this has been asked before. I'm a designer and occasional javascript hacker, not a javascript writer. I cannot believe I have spent over 4 hours searching for this on Google and...
16
Frinavale
by: Frinavale | last post by:
I am just wondering if it is possible to determine where the cursor is located within an <input type='text'> element using JavaScript? I'd like to write a snippet of code that will move to the...
2
by: Doug | last post by:
Hi I am trying to find a way to make the mouse cursor move to the keyboard cursor position in an application. For example, I use an application called Enterprise Guide, and I control this...
2
by: Mohit | last post by:
Hi all, I am working on a windows application with a list view on a form. Now I wanted to show hand cursor when mouse is over list view item and default(arrow) cursor at other places. List...
21
by: tvnaidu | last post by:
This is the Java script I am using fo rlogin page, but cursor not pointing to login box, any idea how can I point cursor to login box when this page loaded?. here admin login take to control page and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.