douqi2571 2015-02-03 19:08 采纳率: 0%
浏览 39

AJAX将发布到原始页面而不是其他页面

I have a script that submits multiple forms using AJAX. It will post the data successfully if the url used is the originating page, but it will not post the data to another page (the page I use for processing).

Can anyone tell me why this is happening?

/* AJAX for edit */
    var submitForms = [
                        document.forms["editRow"],
                        document.forms["editRow2"],
                        document.forms["editRow3"],
                        document.forms["editRow4"],
                        document.forms["editRow5"],
                        document.forms["editRow6"],
                        document.forms["editRow7"],
                        document.forms["editRow8"]
                      ] 

    $('.submitEdit').on('click', function() {
        var editRow = $(submitForms).serializeArray();
    $.ajax({
        type: 'POST', 
        url: "IRCprocessinventory.php",
        data: editRow,
        cache: false,
        success: function(result){
            $('body').html(result);
        } //end result
    }); // end ajax 
    }); // end click    
  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 Stata 面板数据模型选择
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 请问这个是什么意思?
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样
    • ¥15 java的GUI的运用