0

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.

Shiro
  • 7,344
  • 8
  • 46
  • 80

1 Answers1

0

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

Community
  • 1
  • 1
rbaker86
  • 1,832
  • 15
  • 22
  • Thanks for your reply, I think Ajax need to use back JS to do back the mechanism. Thank you guys! – Shiro Apr 29 '10 at 12:55