Detect the cursor location using javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mapradheep
    New Member
    • Oct 2009
    • 1

    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
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    for IE you could check the event's target (in IE it is srcElement) id like:

    Code:
    event.srcElement.id
    kind regards

    Comment

    Working...