jquery change event in opera and ie -- setting hidden fields
I have a jquery change function where hidden fields are set to their respective values upon satisfying some conditions. I also have an extra button to check if the hidden fields' values are changed. When I submitted the form(through pressing the Enter key), I got the must-see values for my hidden fields in Firefox, Safari and Chrome but I don't get it in IE(6,7,8) and Opera 10.10.
It acts like this after submitting the form:
Opera/IE: http://localhost:1175/Search?l=makati&i=0&t=0
FF/Safari/Chrome: http://localhost:1175/Search?l=makati&i=1&t=3
开发者_如何转开发But when I click that extra button in Opera/IE, the hidden fields are then set to 1 and 3 and when I submit the form, that's the only time I get it right in Opera/IE. I also have a keypress event.
I already solved my problem.
I just made a separate function which sets the values of my hidden fields then I bind it to my search box's mouseover event. I also used it in my keypress event. In the keypress event, the type of browser is evaluated first. If it is Opera or IE, it calls the separate function to set the values.
I'm just testing autocomplete by the way.
精彩评论