Hi I dont know what I’m missing but if its always says undefined.
function report_grid() {
$.ajax({
type: "POST",
url: "filter_option.php?action=filter",
data: $('#form1').serialize(),
async: false,
success: function(rdata) {
window.my_var = rdata
}
})
}
$('#onscreen').click(function() {
alert(my_var);
return false;
})
All my searches to googles shows that this should work, any idea why its not working.
Well, seems like you just forgot to invoke
report_grid()