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
https://forums.phpfreaks.com/topic/121698-mouseevents-in-firefox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.