Mike Alsup schrieb:
You need to change this:
$j.unblockUI;
to this:
$j.unblockUI();
Mike
thanks for that hint,
i changed that and in my sample it will do the job (documentation should
be updated, see: http://malsup.com/jquery/block/#dialog ) ...
however i changed my sample to hide the prompt and show the loader:
"$.blockUI.defaults.pageMessage = '<h3 class="warning">Anfrage wird
bearbeitet</h3><p>bitte warten ...</p>';"
but this never gets shown. instead the prompt stays til ajaxStop() is
reached.
i now have: (beware the linebreaks)
/* ------------------------------------------------------------------ */
$j = jQuery.noConflict();
$j(document).ready(function()
{
$Ajaxian =
"http://localhost/__kunden_a_bis_z/mEAD/tool/surveyor/admin/Ajaxian.php";
$.extend($.blockUI.defaults.overlayCSS, {backgroundColor: '#D4E7F8' });
$.extend($.blockUI.defaults.pageMessageCSS, {border:'none' });
$.blockUI.defaults.pageMessage = '<h3 class="warning">Anfrage wird
bearbeitet</h3><p>bitte warten ...</p>';
$j().ajaxStart($j.blockUI).ajaxStop($j.unblockUI);
$j('.confirm').click (
function ()
{
$prompt = '<div id="Modal"><h3>Wollen Sie diese Frage wirklich
löschen?</h3><p>Alle zugehörigrn Antworten gehen somit auch
verloren!</p><input type="button" id="ModalYes" value="Ja" /><input
type="button" id="ModalNo" value="Nein" /></div>';
$j("body").append($prompt);
$j.blockUI($j("#Modal"), { width: '300px' });
//
$j("#ModalYes").click(
function() {
// hide the prompt
console.info ('ajax unblocking UI');
$j.unblockUI(); // never gets executed ?
$str = "test";
//console.info("you clicked yes");
$j.ajax({
type: "POST",
url: $Ajaxian,
data: "&action=test",
async: false,
link: $str,
success: function (data) {
$link = $j("#" +
this.link);//$j("div").find("#" + this.link);
//console.info ($j($link));
$j($link).append (data);
$j($link).fadeIn("slow");
},
error: function (XHRo, errType, errMsg)
{},
beforeSend: function (XHRo) {},
complete: function (XHRo) {},
timeout: 30
});
return false;
}
);
$j('#ModalNo').click(
function (){
$j.unblockUI();
//console.info("you clicked NO");
return false;
}
);
return false;
});
$j('#test').hide();
});
/* ------------------------------------------------------------------ */
without linebreaks but you need to replace the "> "'s ...
/* ------------------------------------------------------------------ */
$j = jQuery.noConflict();
$j(document).ready(function()
{
$Ajaxian =
"http://localhost/__kunden_a_bis_z/mEAD/tool/surveyor/admin/Ajaxian.php";
$.extend($.blockUI.defaults.overlayCSS, {backgroundColor: '#D4E7F8' });
$.extend($.blockUI.defaults.pageMessageCSS, {border:'none' });
$.blockUI.defaults.pageMessage = '<h3 class="warning">Anfrage wird
bearbeitet</h3><p>bitte warten ...</p>';
$j().ajaxStart($j.blockUI).ajaxStop($j.unblockUI);
$j('.confirm').click (
function ()
{
$prompt = '<div id="Modal"><h3>Wollen Sie diese Frage wirklich löschen?</h3><p>Alle zugehörigrn Antworten gehen somit auch
verloren!</p><input type="button" id="ModalYes" value="Ja" /><input type="button" id="ModalNo" value="Nein"
/></div>';
$j("body").append($prompt);
$j.blockUI($j("#Modal"), { width: '300px' });
//
$j("#ModalYes").click(
function() {
// hide the prompt
console.info ('ajax unblocking UI');
$j.unblockUI(); // never gets executed ?
$str = "test";
//console.info("you clicked yes");
$j.ajax({
type: "POST",
url: $Ajaxian,
data: "&action=test",
async: false,
link: $str,
success: function (data) {
$link = $j("#" +
this.link);//$j("div").find("#" + this.link);
//console.info ($j($link));
$j($link).append (data);
$j($link).fadeIn("slow");
},
error: function (XHRo, errType, errMsg)
{},
beforeSend: function (XHRo) {},
complete: function (XHRo) {},
timeout: 30
});
return false;
}
);
$j('#ModalNo').click(
function (){
$j.unblockUI();
//console.info("you clicked NO");
return false;
}
);
return false;
});
$j('#test').hide();
});
thanks in advance
micha