+ Start a Discussion

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:
   var oppRes = sforce.connection.query("SELECT id,Name, Pricebook2Id FROM opportunity WHERE id =     '{!SFDC_520_Quote_Opportunity_ID}'");
    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!

Found the cause of this problem:

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

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.

I am using IE.
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.