troubleshooting Question

jQuery.ajax Not Populating responseText

Avatar of paldie
paldieFlag for United States of America asked on
JavaScriptAJAX
3 Comments1 Solution904 ViewsLast Modified:
I have built the following function to make a search query against my server with jQuery's ajax call:
function searchProducts(keywords,container,clicker,exclude){
	/*
	 * @param keywords - words in the title of the category
	 * @param retContainer - the container for the results
	 * @param clickHandler - function to handle clicking of links returned
	 * @param exclude - a list of excluded category IDs
	 */
	var data = 'query=' + encodeURIComponent(keywords) + '&clicker=' + clicker;
	if(typeof exclude == undefined)data = data + '&exclude=' + exclude;
	else data = data + '&exclude='
	var rethtml = jQuery.ajax({
		url:'/index.cfm?action=admin:products.search',
		dataType:'html',
		data:data,
		asynch:false,
		type:'GET'
	}).responseText;
	container.html(rethtml);
	
	return true;
}

The ajax makes the call just fine and if i open firebug I can see the request and the HTML that it returned, but for some reason the responseText variable isn't being populated.  Can anyone see an error with my function call?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros