Open GoogleCodeExporter opened 8 years ago
What you want is $(".tablestuff").flexReload('list_stuff_json.php'), inside the
click function of dialog
function addStuff(com, grid) {
if (com == 'Add Stuff') {
$("#dialog").dialog({ buttons: [{
text: "Add Stuff",
click: function() {
$.ajax({
url: 'stuff.php',
success: function( data ) {
if (data.length > 1) {
$('#error').html(data);
} else {
$('#dialog').dialog('close');
$(".tablestuff").flexReload('list_stuff_json.php');
}
},
error: function(msg) { alert(msg); }
});
}
}],
height: 150
});
$('#dialog').html("<div class='dataform'><label>Stuff Description:</label><input type='text' id='textStuff' size='40' maxlength='40'></h2><div id='error'></div></div>");
$('#dialog').dialog('open');
$("#dialog").dialog({ title: 'Add Stuff'});
}
}
Original comment by Vormav...@gmail.com
on 19 Aug 2011 at 11:17
firebug error
$("#dialog").dialog is not a function
height: 150
Original comment by barbaro...@gmail.com
on 22 Aug 2011 at 2:41
dialog is a "widget" from jQuery UI (http://jqueryui.com/)
Its just a sample. in your case, just replace it by your div management routine.
Original comment by Vormav...@gmail.com
on 27 Aug 2011 at 7:10
Original issue reported on code.google.com by
barbaro...@gmail.com
on 16 Aug 2011 at 12:43