dou7466 2012-08-28 14:33 采纳率: 0%
浏览 36

IE不发送PHP和jQuery的后期数据

In IE only when sending a post request the POST information is not received by the server.

This works correctly in every other browser tested.

The code :

$.ajax({
    url: '/dashboard/draft/get/data?date=' + new Date(),
    type: 'post',
    data:  {
        'draftid': $.allpro.draftid, 
        'iefix': true
    },
    cache: false,
    success: function(response) {
        $.allpro.draft.salary_cap = parseInt(response.data.salary_cap)
        $.allpro.draft.salary_remaining = parseInt(response.data.salary_remaining)
        $.allpro.draft.average_spent = response.data.average_spent
        $('#salary_cap').text(response.data.salary_cap)
        $('#salary_remaining').text(response.data.salary_remaining)
        $('#average_spent').text(response.data.average_spent)
        $.each(response.data.drafted, function(_i, _v){
            if (_v.playerid == "0") {
                var id = _v.teamid
                var is_team = 1
            } else {
                var id = _v.playerid
                var is_team = 0
            }
            $.allpro.draft.playerOptions.queue_add(
                id,
                is_team,
                _v.position
            )
        })
        set_requirements(response.data.requirements)
    }
})

Doing a var_dump on both $_REQUEST and $_POST show nothing was received.

I've researched this and found many of topics describing a similar issue but none provide a fix ... and as you can see I've already tried to add an additional post field, cache bust and disabling the cache with nothing fixing the problem.

Thanks!


Changing this a GET fixes the problem at hand ... but the issue still exists if someone can find a fix.

  • 写回答

1条回答 默认 最新

  • dqhr76378 2012-08-28 15:37
    关注

    Try putting you date in your data array

    $.ajax({
        url: '/dashboard/draft/get/data',
    
        ...
    
        data:  {
            'draftid': $.allpro.draftid, 
            'iefix': true,
            'date': new Date()
        },
    
        ...
    
    })
    

    Then with something like firebug, you can look at the post headers to see if there is posts data.

    评论

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题