Hi
I'm using prototype.js AJAX library to add AJAX to my app.
In the documentation, reference is made to the fact that xmlNode.text works in some browsers, and xmlNode.textContent works in other browsers. They suggest that to get around this problem i should use the following function:
Which is great because IE works using .text and firefox wants textContent. (using .text in firefox returns "undefined" and using .textcontent in IE returns "undefined".
However, the above function returns "undefined" in both browsers. could someone here help me fix this? Pretty Please?
Tracey
Remember... True happiness is not getting what you want...
Its wanting what you have got!
I'm using prototype.js AJAX library to add AJAX to my app.
In the documentation, reference is made to the fact that xmlNode.text works in some browsers, and xmlNode.textContent works in other browsers. They suggest that to get around this problem i should use the following function:
Code:
<script>
function getXmlNodeValue(xmlNode){
return Try.these(
function() {return xmlNode.text;},
function() {return xmlNode.textContent;}
);
}
</script>
Which is great because IE works using .text and firefox wants textContent. (using .text in firefox returns "undefined" and using .textcontent in IE returns "undefined".
However, the above function returns "undefined" in both browsers. could someone here help me fix this? Pretty Please?
Tracey
Remember... True happiness is not getting what you want...
Its wanting what you have got!