Hi all,
This problem surprises me because it does not work in Chrome as well. Chrome!!
Anyways, I have 3 select boxes, A, B, C. On a page load, B and C are hidden. (This is fine in all browsers). Currently, I have an event handler attached to specific values in box A, so that if a value is clicked, B shows itself populated with results according to A. Same thing for C: if a value in B is clicked, C will show itself.
However, this "show" effect only occurs in firefox -- Chrome and IE are confused.
Any suggestions? hints? Here is some code:
$(document).ready(function() {
$("#B").hide();
$("#C").hide();
$('select#A option').each(function() {
$(this).click(function() {
$.getJSON(stuff, callback(data));
});
});
});
function callback(data) {
// alert("hi"); // This isn't working for Chrome / IE! so the callback isn't called
$("#B").show(); // This isn't working for Chrome / IE!
};
EDIT: It Turns out, the 'select#A option' -- the 'option' tag was the buggy one. After changing my handler to "change", I was able to debug and debug till I just removed the option tag -- everything seems to work now.
Thanks,
Michael