473,663 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect the cursor location using javascript

1 New Member
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 2069
gits
5,390 Recognized Expert Moderator Expert
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
13552
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 one that's about to load. I have a page that reloads every 30 seconds in order to access live data. If a user clicks on a link just prior to the page reloading the reload takes precedence over the link click and this is annoying for the users....
12
2389
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, one for each dragable item (boxes about 100x150px), inside another div that sets up a border. my script is instigated by an onMouseOver event and works great for moving items, setting the opacity, etc. The only trouble is (and I guess I should...
4
1674
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 page. Any help would be appreciated. Sid Sidney
2
5000
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 is contained by the panel. I've done this : Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs) If Cursor.Position.X > Me.Location.X + Me.Width Or Cursor.Position.Y > Me.Location.Y + Me.Height _
9
11590
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
4844
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 nothing I have found solves this silly little problem. Background ---------- I have been assigned a poorly-designed site to SEO. It has a number of
16
28067
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 focus to the next text box when the user has pressed the left arrow key and the cursor location has hit the text box's maxLength. Likewise I'd like the focus to move to the previous text box when the user has pressed the right arrow key (or...
2
2403
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 application using Dragon naturally speaking as I have a disability that makes using the keyboard quite difficult. I often have to say the name of an object to make to be the active or highlighted object. However to do something such as drag and drop...
2
5518
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 view's ItemMouseHover event can tell me that mouse is on the item and here I can change my cursor to hand. But I have no clue to change it back to default cursor when mouse is moved out of the list view item.
21
3852
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 user login take to status page, if I give direct path without goto login, both pages display, can I add a check if user didn't login, then redirect to login page for both control.htm and status.htm, let me know. thanks in advance. <script...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8548
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7371
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
6186
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
4182
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...
1
2763
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
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.