duandu8892 2015-11-02 23:44
浏览 54
已采纳

如何在PHP和jquery项目中检查代码重定向的位置

I am working on a open source e-shop called Prestashop.

The problem is, when I disable a module, the site will auto refresh. I would like to know which part of the code and file caused the problem.

Here is the site:

prestigefood.com.hk/zh/

Are there any way to check through browser's developer console / tools to see:

  1. Redirect caused by JS / PHP?

  2. Where is that part of code

  • 写回答

1条回答 默认 最新

  • douzhuang6321 2015-11-02 23:51
    关注

    The redirect is caused by a JS function inside /js/tools.js :

    function autoUrl(name, dest)
    {
        var loc;
        var id_list;
    
        id_list = document.getElementById(name);
        loc = id_list.options[id_list.selectedIndex].value;
        if (loc != 0)
            location.href = dest+loc;
        return ;
    }
    

    Or

    function autoUrlNoList(name, dest)
    {
        var loc;
    
        loc = document.getElementById(name).checked;
        location.href = dest + (loc == true ? 1 : 0);
        return ;
    }
    

    It will be your work to find where it's called ;)

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

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作