views:

401

answers:

1

is there a way to get the referer with the anchor from the referer page..

the situation is - i have a search page which loads results (users) below the search box using ajax. i am changing the hash/anchor on the fly when the search keyword is typed in.

so it becomes http://localhost/users/search#foo

the user gets link in the ajax result to edit the user. i want the user to come back to this same search result after he is done editing the user.

A: 

Anchors are not included in the referrer. You'll need to use query parameters or define the return URL (with the anchor) in the session before updating the user.

Tate Johnson