duanmeng1950 2013-05-07 13:57
浏览 85
已采纳

使用PHP调用ajax调用后端调用PHP函数

I want to call a PHP function from Ajax request. This PHP function will take more than 2 to 3 Min. to execute And user may not want to wait for 2 min. So for this I am planing to make ajax call and redirect to another page so that User can take another request. Till I did -

new Ajax.Request(reloadurl, { 
 method: 'POST', 
 data: $('edit_form').serialize(),
 parameters: $('edit_form').serialize(true)                 
    onComplete: function(transport) {
        //alert(transport.responseText);
        window.location = backurl;  
    },
    onCreate : function () {    
        alert('dsdsdsds');
        window.location = backurl;                          
    },
    onFailure: function() { 
        alert('Something went wrong...');}
    });

But Its not working.. Please help me out- Suggest me the way so that I can call another ajax request simultaneously

  • 写回答

2条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 关于用matlab进行光束整形的问题
      • ¥15 vs code编译器 C语言刚学,想的有点复杂
      • ¥15 航班订票系统函数无法运行
      • ¥20 VS2022无法启动程序,如何解决?(语言-c++|开发工具-visual studio)
      • ¥15 c语言可以做出完整的吗有人看看吗
      • ¥15 电脑流氓插件处理方法
      • ¥15 问一下这个可调恒流源电路用哪个电源接口比较好,想用tapec接口仅作为电源接口这个引脚怎么连啊
      • ¥30 Abaqus做建模的时候网格没办法收敛是为什么?
      • ¥15 车牌识别摄像镜头,httppost,nodejs
      • ¥20 腾讯云托管与本地测试 GET请求获取返回值 完全不同