Hey guys.
Am trying to get the first paragraph from wikipedia page on a topic that's input by user.The javascript part of my pgm :


Code:
<script language="JScript"> 
<![CDATA[
var xml_doc = new ActiveXObject("Microsoft.XMLDOM"); 
xml_doc.async = false; 
xml_doc.load("http://www.wikipedia.com/wiki/[userChosenTopic]");
var para = xml_doc.getElementsByTagName("p")[0];
var textNode = para.childNodes[0];
var actualText = textNode.nodeValue;
]]>
</script>
I need actualText variable to store the text of first <p>tag in the wikipedia page. The part where user inputs the topic and that which actually displays the text works works out, only that I can't get a hold of the actual text. I tried using para.length to get the no. of <p> tags, but it always returns 0.

Also, I would like to know if there's any sense in the following code.


Code:
<script language="JScript"> 
<![CDATA[
var xml_doc = new ActiveXObject("Microsoft.XMLDOM"); 
xml_doc.async = false; 
xml_doc.load("http://www.wikipedia.com/wiki/[userChosenTopic]");
var para = xml_doc.getElementsByTagName("p");
var actualText = para[0].text;
]]>
</script>
All this is for windows speech recognition macro. Am only a few days old in programming world and so inevitably, I say some stupid things. So, help please?