Manipulating/changing adressbar link Help

Posted by Karem on Stack Overflow See other posts from Stack Overflow or by Karem
Published on 2011-01-16T21:35:32Z Indexed on 2011/01/16 21:53 UTC
Read the original article Hit count: 168

I am out of my own "ideas" going through this.

I have a album viewer. When you click next I want the adressbar to hang with it, e.g if you start on ?photoid=1, and click next (next picture appends and stuff), and then i want it to say ?photoid=2.

Now I cant make it say ?photoid=2 without changing/manipulating, and this you cant do without HTML5.

I have made a script in HTML5 that works fine, but then I need to take care of those who dont have HTML5(only chrome, ff4 etc supports html5) Made the script from this( https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history )

I thought of adding #photoid=2 so, ?photoid=1#photoid=2 and then check if theres anything in # then use that instead of the $_GET.. But apparently you cannot do that as # is client side handled and never sent to the server.

So what should I then do?

Any suggestions please to make a workaround this? I checked facebook, what they did to IE users, and I could hear that it "clicked" (the annoying click sound from IE) twice.. the first was to get to the next picture, the second click sound changed the adressbar?!(how?).

And then I also thought hey, html5 is only supported in ff4, and I got ff3.6, and they manipulate the adress bar url when you browse through the album photos, exactly like how I wanted (and what I have written for but it only works in Chrome and ff4..?). How could they do that?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about url