function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AltiumForceAltiumForce 

AJAX 8.0 error: Attribute "xmlns" was already specified for element...

I am getting the error below when calling salefsforce.connection.query:

faultcode:'soapenv:Client', faultstring:'Attribute "xmlns" bound to namespaces "http://www.w3.org/2000/xmlns/" was already specified for element "query"'

Code is simple:Code:
try
{
   var oppRes = sforce.connection.query("SELECT id,Name, Pricebook2Id FROM opportunity WHERE id =     '{!SFDC_520_Quote_Opportunity_ID}'");
}
catch(error)
{
    alert('Error: ' = error) ;
}

 


It seems the same namespace prefix was added twice, and it is done inside connection.js.
This does not happen to all s-controls, I tried but couldn't find the pattern. 

Anyone has a clue? Thanks!


AltiumForceAltiumForce
Found the cause of this problem:

If you have prototype custom methods in your code, this error occurs.
Does anyone know why?



cheenathcheenath
Are you using FF or IE? There is an known bug in 8.0 when used with prototype on IE.

I will file a bug.

AltiumForceAltiumForce
I am using IE.
DevAngelDevAngel
Prototype breaks some core functions of JS.  Once you start with prototype, your pretty much stuck on not using anything else, which is why we always demo dojo or YUI.