You need to sign in to do that
Don't have an account?
Madhu
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.
~ sfdcfox ~
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
What is the JavaScript error that you are seeing?
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:
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).