duanaoreng9355 2014-05-08 10:04
浏览 55
已采纳

JQM动态弹出窗口

I have a form in which on clicking submit button the form data is sent through ajax and the related message may it be error or confirmation details from the server script which has been written in php is displayed . For now every thing is working fine . But what I want to know is that the message whcih is being displayed with help of JS can I change it into JQM popup as I am using JQM 1.4.2 for my design .

Popup

<div data-role="popup" id="mDialog" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
                <div data-role="header" data-theme="a" class="ui-corner-top">
                  <h1>Attention!!</h1>
                </div>
                <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
                  <h3 class="ui-title">{Are you sure you want to delete this page?</h3>
                  <p>This action cannot be undone.}  <?php if($this->error->description!='')echo trim($this->error->description)?> </p>
                  <a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">Cancel</a>    
                  <a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>  
                </div>
            </div>

Thanks in advance

  • 写回答

1条回答 默认 最新

  • dongmaopiao0901 2014-05-08 10:09
    关注

    Try this;

    Put this in your HTML, above your <form>

    <div id="formNotice"><img src="loading.gif" alt="Loading" /></div>
    

    Now put this where you handle the AJAX response

    $("#formNotice").html(AJAXResponse);
    $("#formNotice").popup("open");
    

    Here's the docs

    Jsfiddle (Without JQM - but you get the idea)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?