0

Hello friends,

Well i just realized onmouseover on select options not working in IE/Chrome/safari.
i think bec. IE/chorme doesnot support onmouseover.

Can any one tell me the alternative of onmouseover?


Thanks

5
Contributors
9
Replies
13
Views
6 Years
Discussion Span
Last Post by sharga
0
<select>
<option onmouseover="showtrail();">Dog</option>
<option onmouseover="showtrail();">Bird</option>
</select>

Above is the sample code. onmouseover only works in Firefox but in other browsers it does not work. i think bec. other browsers doesn't support onmouseover in select options.


Thanks

0

I need to show an image when ever i hover on option.
right now onmouseover only work in firefox.


Any idea how it will work?

0

So use a CSS :hover. You can use descendents or classnames to trigger this or if there are too many, perhaps js is your way out. Did you read the article in the link I supplied?

0

yes i have read. but did not understand completely.
I have lots of pet in select.
now what i want to achieve when i hover on every pet. the image of each pet is shown in nearby div. i am achieving this by ajax using onmouseever in option.
but now onmousever only works in firefoxs. its not working in other browsers.
so i think i need to use some jquery for this.

Can you give me the working code here?

Thanks

Edited by navi17: n/a

0

I think I already did in the link.

1. get jquery (google cdn link is best) in the <head>
2. give options a value as a hook for JS. <option value="blah">...</option>
3. write an event handler, either in the head, at the bottom of the page or in an ext js file with similar code to what you saw in the link I supplied.

If you get stuck with js/jQuery, go to that forum for help.

After all, this is A PHP FORUM.

Edited by diafol: n/a

0

onmouseover and titles both works on chrome but only when you give a size to the select box bigger then 2,but this way you will have not a dropdown menu but a list of options

<select size="3">
<option>.....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.