views:

554

answers:

3

i have a asp.net dropdownlist control with onclick and onchange event javascript. both works in IE,mozilla, Opera and google chrome but not in safari.. when i remove onclick, onchange suddenly works. The reason i use onclick is to get the value of the dropdownlist before it change. Is there a way i can do that without using onclick? i mean, get the value of the dropdownlist before it change when you select a new value? i want to do it in javascript only..

Many Thanks,

A: 

i've replaced the onclick event to onfocus. problem solved. i guess safari dont like onclick event on select element

Jepe d Hepe
A: 

For me in Chrome, onclick working with second click on select box Where as in FF & IE, its working fine for first click itself.

Kumaraswamy
A: 

Sometimes you need to add preference to the javascript function as "javascript:". Ex: should be

SKondur

related questions