I have a report launching script that loads the filters from AJAX for a specific report when the report is selected from a drop down list.
My goal is to get the html from within the <html> node and insert it to a pre-existing DIV. I'm having trouble doing this. I tried to use nodeCopy() and even created my own function copyChildNodes. The only thing that is copying is the text 'Date
ate Range: to ' which is displayed in the div without the input fields.
Please help, thanks.
Code:
function copyChildNodes(objRefNode, objParentNode){
nodeCount = objRefNode.childNodes.length;
for (var n=0; n<nodeCount; n++){
copiedNode = objParentNode.appendChild(objRefNode.childNodes[n]);
if (objRefNode.childNodes[n].hasChildNodes){
copyChildNodes(objRefNode.childNodes[n], copiedNode);
}
}
}
The XML Returned is:
Code:
<reportFilters>
<html>
<form name='reportFilters' method='post' target='_blank'>
<input type='radio' name='date' value='single' checked='checked' />Date:
<input type='text' id='datebox0' name='date_0' value='' /><br/>
<input type='radio' name='date' value='range'/>Date Range:
<input type='text' id='datebox1' name='date_1' value=''/><span style='float:middle'> to </span>
<input type='text' id='datebox2' name='date_2' value=''/><br/><br/>
<input type='submit' id='btnSubmit' name='report' value='Create Report'/>
</form>
</html>
<script type='text/javascript'>
cal0 = new Calendar({ datebox0: 'm/d/Y' }, {direction: -1});
cal1 = new Calendar({ datebox1: 'm/d/Y' }, {direction: -1});
cal2 = new Calendar({ datebox2: 'm/d/Y' }, {direction: -1});
</script>
</reportFilters>
Bookmarks