Hello all, I was trawling the web for an answer to this one - is there an accepted/preferred methodology for updating the browser address bar after an AJAX page transition? For example, I have a list of folders, which when clicked use an XMLHTTP request to display the contents via an update to a <div>. After this is done, I would like to show a RESTful url in the address bar for people to be able to share access the same view via a normal HTTP GET. Any thoughts/ideas would be much appreciated! Monkeyten --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
For security reasons (phishing), you can''t change the location bar from javascript without loading the new location. You''ll have to display that permalink in a prominent place in the page. For example, breadcrumbs at top-left that spell out the URL. monkeyten wrote:> I was trawling the web for an answer to this one - is there an > accepted/preferred methodology for updating the browser address bar > after an AJAX page transition?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can change the location bar from javascript without reloading as long as you only change anchors. It would however require some javascript on page load to take the users to that folder. Tiago Macedo Ix Quic wrote:> For security reasons (phishing), you can''t change the location bar from > javascript without loading the new location. You''ll have to display that > permalink in a prominent place in the page. For example, breadcrumbs at > top-left that spell out the URL. > > > monkeyten wrote: > >> I was trawling the web for an answer to this one - is there an >> accepted/preferred methodology for updating the browser address bar >> after an AJAX page transition? >> > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---