View Full Version : Resolved trying to run php script with JS with SEF enabled

02-02-2011, 10:24 PM
Hey guys, i'm trying to set up a favorite system for my website and I'm using ajax to do an async request to the server to run a php script.

The problem is that i'm running joomla with sef enabled. So whenever i'm on a page the URL looks like:


when i click on the favorite button it will look like this


This obviously doesn't work...

I followed this tutorial:

My question is how do i fix this.. can i get the base URL or something? I am a TOTAL noob to javascript. i somewhat understand it, but i have no clue what i'm doing. I just have basic programing knowledge through MATLAB and PHP...

BTW, the key here is not to leave the site :)

Thanks for the help in advance :D


added my domain name in front of the location of the file and fixed the problem =)