Page 1 of 1

ajax problem in Joomla

Posted: Mon Mar 17, 2008 11:35 am
by ranawd
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
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

When i call this function then all page comming in my joomla page. Please help me anyone asap.

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;

Code: Select all

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