I have a search box that sends an ajax request to a snippet. When the snipped function gets called I would like the search query to get added to the URL via a anchor hash (ala: http://localhost/search#param) so I can recreate the search request if the user copies the URL and comes back later. Obviously the other side to this is pulling the anchor field in the snippet so the search can be recreated as necessary. I am a bit lost as to how to do this..not even sure where a good starting point is. Any tips or hints on how to do this in Lift would be very welcome.
Share
I just got this working.. here’s my template:
And my snippet:
The trick is to save the url when the snippet originally renders so that you don’t get the ajax_request/… uri from which the ajax form submits.