PDA

View Full Version : AJAX not working in Joomla 1.5


Yoda_Oz
11-26-2008, 06:17 PM
hi,
at the site http://dev.frrm.org i have joomla 1.5 installed and i cannot get the ajax to work on epc. when i click on the navigation button nothing happens.
it works fine in the demo.
please help, it's urgent!

ve9gra
11-26-2008, 08:00 PM
AJAX is a Beta feature. And you can't use the Joomla integration module to use the AJAX mode... it is a non-compliant integration. Follow the integration instructions and do it manually.

Yoda_Oz
11-26-2008, 09:02 PM
it still doesnt work with manual integration...
any ideas?
thanks very much for your initial quick reply by the way! :)

Yoda_Oz
11-26-2008, 10:12 PM
i think i found the problem:
im getting a javascript error and looking at the final html source code it says this:
function loadurl('/dest, EPCnav') lon line 72 instead of this:
function loadurl(dest, EPCnav) which occurs on the demo page.

do you know why this is happening?

Yoda_Oz
11-26-2008, 11:32 PM
any clues, i still can't find a reason why it would do this! it seems there is some script that is changing the code to something it's not meant to be!
the exact line 72 is this:
function loadurl('/dest, EPCnav') { \n

what it should say instead is this:
function loadurl(dest, EPCnav) {

the problem is that in calendar.php it says it right. it's when it gets outputted to the screen and it comes out wrong.
this is really annoying!

ve9gra
11-27-2008, 07:11 AM
Do you still have the AJAX page up somewhere? I'd like to take a look.

Yoda_Oz
11-27-2008, 07:16 AM
yes. i put it back to the ajax version now so you can see. http://dev.frrm.org

ve9gra
11-27-2008, 05:33 PM
Actually, that's because of the templating engine in Joomla... I'm pretty sure. It's not just the "/dest"... it's that it changes the actual function.

This is what the line should be:function loadurl(dest, EPCnav) {
But here's the line from your site:function loadurl('/dest, EPCnav') {
See how it put the arguments inside of single quotes...

If you do the manual integration (as in actually putting the $CSS and $EPCAJAX lines before </head> and the $OL line right after <body>), this shouldn't occur... "shouldn't" being the operative word here.

Yoda_Oz
11-27-2008, 05:50 PM
no, that doesnt work. ive tried already. i put it back to the original module because i figured that it's better like that than being hard coded into the index.php of the template.
ill try again though. maybe i did it wrong or something. ill unpublish the module one and keep the hard coded one in there.
anyway, its up there now for you to see. please let me know if im doing something wrong.

ve9gra
11-27-2008, 09:33 PM
You're right... items all at the correct places, but still messed with. That has to be the templating engine mucking with the output.

I guess you might be better off with the regular mode.

Yoda_Oz
11-27-2008, 09:48 PM
bugger! i guess so. im going to continue this discussion over at joomla's own forum. can anyone suggest what i should be asking them over there?

ve9gra
11-28-2008, 07:15 AM
Perhaps how to create a function that you could call using a tag in the template so that the engine leaves the code alone.

I remember doing something of the sort for [iirc] Postnuke. I ended up creating a function called epccss, and epcol and was adding <!--epccss--> and <!--epcol--> in the theme template for the code to be added at the proper locations. Perhaps the same logic can be applied to Joomla.