Results 1 to 5 of 5

Thread: Dynamic Ajax Content Script

  1. #1
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Dynamic Ajax Content Script

    This is in regards to the Ajax COntent Script.
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    Hello all,

    I am excited about this script as it uses div's to populate content. I don't know if you can help me but I am trying to apply it to our open source Moodle(e-learning) system. I get the pages to load up in the div, but the problem I am having is that the links inside of the page default to the root of the page it is loading in.

    So, if I load up a page like ../grade/view.php into a div at ../course/index.php and click on a link in the grade page loaded it should go to ../grade/view.php&edit=2 but it links to ../course/view.php&edit=2.

    I know it probably is nothing in the script, but was wondering if there is something I can add to the script so it can use the url of the loading page.

    It does it for all the pages I try to link to. I posted a question to their forum too.

    Thanks for any advice,
    Deon

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You ought to use an iframe here.

    I just suggested using an iframe. How profoundly unnatural. Anyway, any browser that has AJAX will have iframe support too, so you won't lose any compatibility.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Twey,

    Thanks for your response, but I am trying not to mess with the core program too much. The div solution works perfectly for this program but just the linking issue. I will keep poking around and see what i can do.

    Thanks for the advice,
    Deon

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It could be difficult, unless you converted the URLs server-side.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes I know. That is what I was trying to avoid. I am trying to find the code that calls the page referring url and see if I can change that code. I was just wondering if there was a script solution to make it easier if not I will have to find the same bit of code in every lib file.

    Thanks,
    Deon

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
  •