+ Start a Discussion
MadhuMadhu 

Mozilla

hai
i have one doubt, will mozilla supports Ajax Tool Kit9.0 or not,my problem
is my code is working on IE but the same is not working on mozilla,in my code
i used Ajax Tool Kit9.0
 
 Regards,
  yellaiah.
sfdcfoxsfdcfox
I use the toolkit often and I almost always use Firefox, and I've never had a problem. Most likely, you're using non-Mozilla/standard code somewhere in your script. Could you post a few lines of code so we can actually assist you in solving your issue?

~ sfdcfox ~
MadhuMadhu

hai

iam sending some code to u,pls see and possible solve the problem.

var callback = {
//call layoutResult if the request is successful
onSuccess: layoutResults,
//call queryFailed if the api request fails
onFailure: queryFailed,
source: state};
//alert("ok2");
sforce.connection.query("select admin_Code__c , Site  from Account where Id='"+id+"' ",callback);}
function queryFailed(error, source) {
//alert("ok3");
//source.output.innerHTML = "An error has occurred: " + error;
}
/**
* This method will be called when the toolkit receives a successful
* response from the server.
* @queryResult - result that server returned
* @source - state passed into the query method call.
*/
function layoutResults(queryResult, source) {
if (queryResult.size > 0) {
//alert(result is"+ok5);
//alert(id);
//var id13 = "";
//get the records array
var records = queryResult.getArray('records');
//alert(records);
//loop through the records and construct html string
for (var i = 0; i < records.length; i++) {
var account = records[i];
//alert(account);
//alert("site"+account.Site);
if(account.Admin_Code__c==null)
{
document.getElementById("id12").value="" ;
}
else
{
document.getElementById("id12").value=account.Admin_Code__c
}
if(account.Site==null)
{
document.getElementById("id13").value="" ;
}
else
{
document.getElementById("id13").value=account.Site;
}

}
***********************************

that callback is not executing in mozilla...............but its in IE

 

 

Ron HessRon Hess
it looks like the variable state is not defined, perhaps this works in IE and fails in Firefox.
What is the JavaScript error that you are seeing?
JashuganJashugan
I'm not sure if it is a function of the paste, but there were a lot of incomplete bracket completions and other punctuation problems. Here's a cleaned up version: http://rafb.net/p/X45cOa11.html

Two things for future pastes:
1. use a code pasting service like rafb.net. Or at the very least wrap the code in pre tags, like this:

function test():void {
alert("This is a test");
}

2. please clean up the code a little bit. There was no reason to have all of the alert functions everywhere when you pasted it; it makes the code harder to read.

If you are having problems with Firefox get Firebug, the debugging tool for Firefox. It will show you where your errors are. From experience IE is pretty lenient with badly formatted code (like case-insensitivity).