Results 1 to 3 of 3

Thread: Links in ajaxed pages

  1. #1
    Join Date
    Aug 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Links in ajaxed pages

    So I've been playing around with the last script, the AJAX Tab Content.
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    My question is:
    Why links in ajaxed pages wont work? Is there a particular grammar to use?
    thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I mean this respectully, as English seems a second language for you, but just so you know "grammar" for code and programming is called "syntax". That will help make things more clear.

    Links with that script, generally, should work.

    Please post a link to the page on your site that contains the problematic script so we can check it out.



    My suggestion is that you may be including a page with local links...
    <a href="something.html">, and, when included on your page, those links don't go anywhere because "something.html" doesn't exist in your directory.

    However, if you were to use "<a href="http://....../something.html"> including domain name (.com, etc) and http, in the INCLUDED page in the first place, this would solve the problem, most likely.

    This is "relative" vs. "absolute".
    Relative links are "compared to current location"
    and
    Absolute links go to EXACTLY the thing they link to.

    Since the "relative" location is changing, they need to be absolute links.




    If you're controlling your included pages, great.
    If not, you can't change links if they are set to relative.
    As such, you could either do some incredibly complex code fixing this problem (going through with code and changing each link in the included document to be absolute)
    Or... you could just use iframes instead.

    The ajax thing may work with iframes, but I'm not sure... would need to changes, certainly.

    And.. in that case, ajax won't help you too much anyway.


    Hope I'm pointing you in the right way.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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

    Default

    Define not work. I would imagine that, as an AJAX include becomes a part of the page it is viewed on, that any links on the AJAX page when viewed through a given page, would work just like any other link on that page. This would include being relative to that page's directory position (not the AJAX page's) if relative urls are used.
    - 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
  •