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
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
I think using .css is the way to go here.
Is it a text link or image link you are using?
onmouseover works on all browsers. Where you need on mouse over? please post your code..
<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
Could you use :hover in css or is the js a little more complicated than showing an image or something?
IE does support onmouseover, but not on <option> (so I believe).
Personally, I'd use an event handler as opposed to using inline js.
If using jQuery:
I came across this earlier.
Go to the thread item that starts: "I had a slighty different problem..."
http://stackoverflow.com/questions/206997/jquery-javascript-ie-hover-doesnt-cover-select-box-options
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?
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?
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
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.
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>.....
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.