You need to sign in to do that
Don't have an account?
Abraham
Working in mozilla but not in IE 6
All i have the following code working in mozilla but it gives me document.getEleme...... is null or not an object error.
My code is this
var formFields = ["Group_Name__c", "Other_Competitive_Distributer__c"];
and i am using this like this
for(var field in formFields) {
if(formFields[field] == "Group_Name__c") {
saveObject["Name"] = document.getElementById(formFields[field]).value;
}
if(formFields[field] == "Other_Competitive_Distributer__c")
{
break;
}
{
break;
}
}
This code works fine in mozilla but in IE it fails.
Can someone help ?
Thanks in advance
jrotenstein
I'd say you've got in-page fields whose Name does not match the Salesforce field name (eg Custom Fields). If you get the Microsoft Script Editor going in IE, you should be able to debug it.
michaelforce
Make sure the page has fully loaded before allowing this script to run... call it 'onload' of the body for instance. Otherwise the Element may simply not have been rendered yet so it can't be 'gotten'.