Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetAttribute on XML in JavaScript

Status
Not open for further replies.

Cantona7

MIS
Apr 29, 2003
4
US
We're trying to set an XML attribute within some JavaScript code. The following only seems to work on some browsers, and even then we're not sure what makes it work/not work

objXMLElem.setAttribute("XXX") = strTemp


From the documentation,
objXMLElem.setAttribute("XXX", strTemp)
appears to be the only defined method of doing this.

Any idea on the differences between these two? Is the first some sort of unsupported extension?

thanks
 
the first would be incorrect syntax! ;-)



=========================================================
while (!succeed) try();
-jeff
 
Well yes...but then why does it work on some IE5.5 SP 2 machines and not other IE5.5 SP2 machines?!
:eek:)
 
who knows...best bet is to use proper syntax.

=========================================================
while (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top