Results 1 to 2 of 2

Thread: php ajax with different url

                  
   
  1. #1
    Advance Entrepreneur Array
    Join Date
    Aug 2011
    Posts
    201
    Country: Albania
    Post Thanks / Like
    Rep Power
    1

    Default php ajax with different url







    i've seen this on many website. They're using ajax to load the contents, but at the same time, they are able to change the url adress. how is this possible?

    I though using ajax is change on the fly and if the url change, then the page should refresh.

    One example that i saw was on Facebook. for those that actually have one. When you are viewing their pictures, you are able to click on the next link, the picture and the url will change, but the page doesn't.

    what kind of an advance ajax is this? anyone has any idea on how to do this?

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  2. #2
    Junior Entrepreneur Array
    Join Date
    May 2012
    Posts
    31
    Country: India
    Post Thanks / Like
    Rep Power
    0

    Default







    The way to do this is to manipulate location.hash when AJAX updates result in a state change that you'd like to have a discreet URL. You can get the query string with javascript and then parse out the id in javascript and call php page with that parameter. This way onclick and hard refresh will produce same data as you can get the id parameter from javascript and from php.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    |
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


LinkBacks (?)

  1. 11-14-2011, 03:40 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
website stat