Call Dialog.Modal with error

I think I'm missing something here. in Script: $('#dialog:ui-dialog').dialog('destroy'); $('#dialog-modal').dialog({ width:150, height:150, resizable:false, draggable:false, autoOpen:true, modal:true }); I use AJAX to call for Data, when the pull detect an error, I want it to pop up an dialog.modal, but it just won't do so. I think I'm missing something here. in PHP: case ($amt > $total_storage): echo "

Not enough Storage!

"; (this one don't work) echo "Test Error"; (this one works) break; I tested with echo and it does display "Error" but not the dialog.modal. I just want it to **autoOpen** when it detects an error. New Workable Version: PHP: case ($amt > $total_storage): echo ":err:

Not enough Storage!

"; break; JS: function CitySell(a){ $.ajax({ beforeSend: function(){ $(".Bags").attr("disabled", "disabled"); }, url: "DataPull.php?get=CitySell&SSIDD="+$('.SDI_'+a).val()+"&SSAmD="+$('.STS_'+a).val(), success: function(data){ $('#Listing').html(parseScript(data)); if(data.substr(0,5) === ':err:'){ $('
').html(data.substr(5)).dialog({width:250, height:150, resizable:false, draggable:false, autoOpen:true, modal:true}); $('.Bags').removeAttr("disabled"); } else { Listing(); CommonUpdates(); } } }) }

以上就是Call Dialog.Modal with error的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏