Hi all,
Please see the snippet below.
The exception is being thrown. The XML string is dead simple like <xml><tagName value="://?&"></xml>. I use VIM and I can clearly see there is not a typo in variable names. Can you please explain why I am getting the Typedef error?
It is for an Opera Extension for personal use, but I doubt the Typedef error is caused by the browser.
--Glen
Please see the snippet below.
The exception is being thrown. The XML string is dead simple like <xml><tagName value="://?&"></xml>. I use VIM and I can clearly see there is not a typo in variable names. Can you please explain why I am getting the Typedef error?
It is for an Opera Extension for personal use, but I doubt the Typedef error is caused by the browser.
JavaScript:
var accessing = xml.getElementsByTagName('tagName');
if(accessing) // its definitely valid XML
{
try
{
var accessObject = accessing[0];
alert(accessObject.getAttribute('value')); // displays the expected "://?&" string
var value = accessObject.getAttribute('value'); [COLOR=#5C3566]// what could possibly go wrong?[/color]
}
catch(e)
{
alert(e.toString()); [COLOR=#5C3566]// Typedef Error: cannot convert accessObject to Object[/color]
}
}
--Glen