susanBuck Posted May 2, 2008 Share Posted May 2, 2008 My Ajax is working fine in Safari and Firefox when Firebug is enabled...But when Firebug is disabled or not installed, it breaks. It's a common problem I've found on Google - apparently its a bug in Firefox that is being covered by something Firebug is doing, hence things working fine when Firebug is enabled. Here's a couple of sites talking about this problem : http://lukav.com/wordpress/2007/04/12/firefox-firebug-and-synchronos-calls-problem/ http://www.coachwei.com/blog/_archives/2007/11/17/3358362.html But despite the info i've found, I still haven't figured out whats going on. Originally I was using the w3schools example code (http://www.w3schools.com/Ajax/ajax_server.asp), but then I just switched to the mootools ajax class thinking that would help - but its doing the same thing. here's what my code looks like /* -------------------------------------------------- ajaxMagic --------------------------------------------------- processUrl = the name of the php page which is doing processing params = an array of query strings to to be sent to the php page ex. params array may look like this: params[0] = "action=add"; params[1] = "note=butterscotch"; params[2] = "tags=dogs,cats,birds"; resultsTargetId = where the results should be put...div */ function ajaxMagic(processUrl,params,resultsTargetId,loaderDiv){ var queryStrings = ""; // Take each item in params and make it part of the query string for(var i = 0; i < params.length; i++) { queryStrings += params[i] + "&"; } // remove the & off the end var queryString = queryStrings.substring(0,queryStrings.length-1); // Append the query strings to the processUrl processUrl = processUrl + "?" + queryStrings; // Run the Ajax new Ajax(processUrl, { method: 'get', update: $(resultsTargetId) }).request(); } // end ajaxMagic(); Quote Link to comment Share on other sites More sharing options...
susanBuck Posted May 2, 2008 Author Share Posted May 2, 2008 Agh - solution... Firebugs Console.log() function will break Ajax in Firefox if Firebug is disabled or not installed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.