dynamically changing dialog content
Hello All
(FWIW, my entire code is the alpha-stage MELT monitor on github )
I am using a jquery dialog for a modal form. That form contains an input text field. When the input is wrong (it is sent thru an AJAX post), I want to append a warning message after the form, and keep the modal dialog open.
I can't understand how to do that. I tried several things.
// datado is from the JSON in the AJAX successful reply
// addediteminp_mom is the input inside the dialog
//#mom_additem_msg is the message div
else if (datado == 'momedit_baditem') {
addediteminp_mom.val("");
var warn = $('#mom_additem_msg').html("<br/><b class='mom_warning_cl' id='mom_warnbaditem_id'>bad item!</b>");
additemdlg_mom.dialog({show: true});
console.debug ("additemdlg add ajax_edit baditem warn=", warn);
warn.delay(600).fadeOut(500).delay(100).empty();
console.debug ("additemdlg add ajax_edit baditem emptied warn=", warn);
}
Any clues?
Regards
Basile Starynkevitch