Jump to content

Recommended Posts

Hello so I tried to use the onhashchange to solve the back and forth button issues in ajax.. but it's not working. I think I still dont get it somehow. I'm gonna add link of my page so you can look to the source code and hopefully someone could help me fix that and make the back and forth buttons work? I would be really REALLY greatful!

 

http://www.jandocekal.cz/tst2/

 

The website is in czech language, but that hopefully doesnt matter. the buttons working are "Hlavní stránka" "Kontakt" and "Služby" and If u click them it loads a text into a div called "home". Well and I wanted to do a thing that if I click "Služby" and then hit back in my browser, its gonna take me one step back. Any help please??

 

TYIA and I hope someone will help me, btw I know my code is a bit of a mess..  sorry :-(

Link to comment
https://forums.phpfreaks.com/topic/255315-backwards-and-forwards/
Share on other sites

I just had a look and it seems to be working?

 

Yes I finally figured it and noone was responding here :-) The only problem I have now is how to make it that there is a page1.html loaded into the div by default.. because now if you put the address into the browser you get on a div with "obsah?" and then u can click anything.. but you wont get back to the "obsah?" page..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.