View Full Version : Dynamic Ajax Content Script

02-23-2006, 04:20 PM
This is in regards to the Ajax COntent Script.

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,

02-23-2006, 04:37 PM
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.

02-23-2006, 05:05 PM
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,

02-23-2006, 05:20 PM
It could be difficult, unless you converted the URLs server-side.

02-23-2006, 06:55 PM
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.