By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,928 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,928 IT Pros & Developers. It's quick & easy.

Detect the cursor location using javascript

P: 1
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
Share this Question
Share on Google+
1 Reply


gits
Expert Mod 5K+
P: 5,381
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

Post your reply

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