Jump to content

MouseEvents in Firefox


kjtocool

Recommended Posts

Hello everyone, I have a bit of a problem.  I am writing a custom ajax suggest box, and running into problems making it compatiable with Mozilla.

 

The events I use are as follows:

 

Body:

onclick="emptySuggestions();"  - This event simply clears out the div tag containing the suggestions.

onkeydown="handleTab(event)"  - This event handles a user hitting the "tab" key, if there are suggestions, it then empties them.

 

Input Text Box:

onfocus="resetCurrentLi()"  - This event resets the current <li> of the <ul> to nothing on focus.

onkeyup="handleInput(event, this.value);"  - This event does the heavy lifting, sending the users input on each keyup event.

 

Each LI:

onmouseenter=\"newCurrentLi(this.value, '" + escape(split) + "');\"  - This html is all generated via javascript, thus the escapes.  Essentially, onmouseenter it fires with the number of the li on a zero based index, and the text in the li.  Obviously, this doesn't work in FireFox!

onclick=\"emptySuggestions();\"  - This empties the suggestions, since one was clicked.

 

 

 

 

Everything is working great .... in IE.  In mozilla, all the rollover events based on the "mouseenter" don't work.  Can someone advise me on an equivalent event, because I can't seem to find a workaround.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.