Page 1 of 1

ajax problem in Joomla

Posted: Mon Mar 17, 2008 11:35 am
by ranawd
Hello
I am new comer in Ajax. I have function like bellow
function getCityList(sel)
{
var countryCode = sel.options[sel.selectedIndex].value;
document.getElementById('dhtmlgoodies_city').options.length = 0; // Empty city select box
if(countryCode.length>0){
ajax.requestFile = 'getCities.php?countryCode='+countryCode; // Specifying which file to get
ajax.onCompletion = createCities; // Specify function that will be executed after file has been found
ajax.runAJAX(); // Execute AJAX function
exit();
}
}

When i call this function then all page comming in my joomla page. Please help me anyone asap.
Email: rana_0036@yahoo.com

Re: ajax problem in Joomla

Posted: Mon Jul 07, 2008 5:32 pm
by secteur
Hi Rana,

have you tried adding format=raw to your URL
ajax.requestFile = 'getCities.php?countryCode='+countryCode;
becomes

Code: Select all

ajax.requestFile = 'getCities.php?format=raw&countryCode='+countryCode;
Hope this helps