dongshou2024 2010-04-28 09:50
浏览 14
已采纳

PHP保存页面然后重定向到上一页(ajax)

I would like to ask for how to redirect to previous page (ajax paging).

Example, Let's say currently I am in page 5, then I click on one record, after I edit it, I would like to go back to that page 5 not page 1.

The problem is my paging is using ajax,

http://domain/photo/#5

I try to use $_SERVER[http_referer], but I only get http://domain/photo , I not able to get # and the value.

What is the best way to redirect back to the previous paging. My last choice is using $_SESSION. Hope I can get better answer here.

Thx.

  • 写回答

1条回答 默认 最新

  • douhuang2673 2010-04-28 10:15
    关注

    Like Lauri says, you need to manage this at the client-side using Javascript. Basically you need to implement some sort of client-side browser history. Just look at how Facebook loads in photos, but still lets you use the back button.

    There are various libraries available to help you:

    JS History Frameworks

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

报告相同问题?

悬赏问题

  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题