ajax problem in Joomla

Forum closed, please submit your tips and tricks to: http://docs.joomla.org/Category:Tips_and_tricks
Forum rules
Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks

This forum section will be closed and removed eventually.
Locked
User avatar
ranawd
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Dec 26, 2006 9:40 am
Location: Bangladesh
Contact:

ajax problem in Joomla

Post by ranawd » Mon Mar 17, 2008 11:35 am

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
Regards,
Saidur Rahman (Rana)
Email: rana_0036@yahoo.com

secteur
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 146
Joined: Tue Nov 08, 2005 9:32 am
Location: Malaysia

Re: ajax problem in Joomla

Post by secteur » Mon Jul 07, 2008 5:32 pm

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


Locked

Return to “Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.”