Results 1 to 3 of 3

Thread: Dynamic Ajax Content - Bookmark/URL Question

  1. #1
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic Ajax Content - Bookmark/URL Question

    1) Script Title: Dynamic Ajax Content

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    3) Describe problem: Since the content is loaded into the div from another file, the URL of the page of course, does not change. Is it possible to have the URL update to reflect the name of the html file that is being loaded in the div? I'd like people to be able to bookmark a particular page on my site, but the URL never changes, so bookmarking isn't possible. Any workaround for this?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmmm I definitely don't see anyway to do this. The whole idea of Ajax is to load the contents of another page without havigating to it. The browser's bookmark feature is designed to bookmark the current page's URL- you can't change that info using JavaScript without actually navigating to the desired page.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I looked at this one earlier and had a brain cramp. It could be done, but why bother? If that is your goal, it would be better to use separate pages that look alike, but that have different content in the tab area and that use the tabs as actual links to one another. Alternatively, server side code could be employed to create a page that shows different content depending upon the bookmark-able query string attached to the URL. It is via this latter method that bookmarks could be used with the script, if it were modified to attach a query string to the URL that also would activate a given tab. The activation part of the code has been discussed in several places in this sub forum already and successfully implemented for pages linking to the tab script page. So it would just be a matter of generating the query portion of the URL on each tab click, but the page would need to reload each time anyway.

    There is another consideration though. If you want bookmarks, you would probably also want SEO. For that, you would need separate pages.
    Last edited by jscheuer1; 08-20-2007 at 06:44 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •