jquery .html() problem with IE
<form name = "id_form">
<input type = "hidden" name= "id_data" value = "'.$id.'">
<input type = "button" value = "Request Price" id = "sess_s" >
</form&开发者_如何学Pythongt;
$('#sess_s').click(function() {
$.post('data.php',{id_value: id_form.id_data.value },
function(output) {
$('#sess_feed_top').html(output).show();
});
});
As soon I click the button #sess_s
, the data suppose to show disappears in IE. It works fine with other browsers. I think the problem with .html(output).
any solution? thanks
I'm not sure you can rely on global variables for form fields.
var dataHolder = $('form[name=id_form] input[name=id_data]');
$('#sess_s').click(function() {
$.post(
'data.php',
{id_value: dataHolder.val()},
function(output) {
$('#sess_feed_top').html(output).show();
}
);
});
精彩评论