Bizarre jQuery AJAX issue in IE7 and IE8 only - click after successful load fills page with 'undefined variable' errors
I have a page with a form that has multiple input fields that are dynamically filled based on a choice made on a dropdown selector.
$('#name').change(function() {
var id = $('#name').val();
var options = {
url: 'data/' + id,
type: 'post',
target: '#in开发者_如何学JAVAsert',
replaceTarget: true,
resetForm: true
};
$('#name_form').ajaxSubmit(options);
});
On IE7 and IE8 I initially select a name from the dropdown.
The input fields are populated correctly based on the name I choose.
But if I click anywhere on the page, those same fields are then filled with 'undefined variable' errors output by my framework ( codeigniter ).
It's like the click sends an empty request that gets an empty response which will obviously crash the page since it has nothing to populate the input fields.
Needless to say this does not happen on FF, Cr, Saf - only IE.
Has anyone seen this behavior or have any ideas how to solve this?
精彩评论