dppx9253 2017-03-08 12:49
浏览 75
已采纳

在每个Ajax调用上重新加载调用页面

I need a page called via ajax to fully reload everytime I request it. Currently, when requested for the first time it loads the page correctly, but when requested the second time it loads with the previous result and then after 2 or 3 second loads the new result.

I want it to show a loading image while it reloads the page into my div.

See code I'm using below:

$io('#load_order_preview').on('click', function(){

            var portfolioName       = $io("#portfolioName").val();
            var instrumentType      = $io("#instrumentType").val();
            var securityName        = $io("#securityName").val();
            var orderType           = $io("#orderType").val();
            var priceType           = $io("#priceType").val();
            var quantityRequested   = $io("#quantityRequested").val();
            var orderTermName       = $io("#orderTermName").val();
            var limitPrice          = $io("#limitPrice").val();
            var stockPrice          = $io("#stockPrice").val();
            var stopPrice           = $io("#stopPrice").val();

            var dataString = 'portfolioName='+ portfolioName + '&instrumentType=' + instrumentType + '&securityName=' + securityName + '&orderType=' + orderType + '&priceType=' + priceType + '&quantityRequested=' + quantityRequested + '&orderTermName=' + orderTermName + '&limitPrice=' + limitPrice + '&stopPrice=' + stopPrice;

             $io('#load_popup_modal_orderpreview').load(
                 'load-preview.php?' + dataString
             }).modal({
             backdrop: 'static',
             keyboard: false
             }).show();

        });

I'd really like some help to solve this problem.

Thanks in advance.

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 如何关闭soui dummy wdn 进程
      • ¥20 含有jar文件的文件夹用tar -zcvf 命令压缩后要怎么还原回去?
      • ¥15 天宝TBC软件出现报错怎么解决
      • ¥15 micropython 从1开始切片报错
      • ¥15 请问该怎么做才能将文字说明和二维码一起作为png图片一起下载
      • ¥15 r语言 混频数据回归 midas_r
      • ¥15 人脸识recogizer.predict返回值id报错,KeyError,详情如下
      • ¥15 geowebcache部署失败
      • ¥20 关于adaboost+haar特征实现人脸检测过程的一些细节问题
      • ¥15 csv文件增加一列 为csv文件的名字