I am trying to load a document from a remote URL into a pre-existing DIV area. I build the URL dynamically using javascript based upon user form input and would like to display the results of the query within the same page within a pre-existing DIV area. In Netscape I have accomplished this easily by setting the src property of the layer (document.layers.mydivId.src = theURLIbuild I cannot figure out how to accomplish this in MSIE. I am wondering if there is a property within the document.all.mydivId object that can be set to a URL to accomplish the same result under MSIE?
<SCRIPT>
function getDoc(x,y) {
var str='str += x + '&y=' + y;
if(document.layers)
document.layers.mydivId.src = str;
else if(document.all)
alert('do not know what to do here.');
}
</SCRIPT>
...
<DIV ID="mydivId">
<FORM NAME=theForm>
<INPUT TYPE=text NAME=x><BR>
<INPUT TYPE=text NAME=y><BR>
<INPUT TYPE=button VALUE="getDoc" onClick='getDoc(document.theForm.x.value,document.theForm.y.value)'>
</FORM>
</DIV>
<SCRIPT>
function getDoc(x,y) {
var str='str += x + '&y=' + y;
if(document.layers)
document.layers.mydivId.src = str;
else if(document.all)
alert('do not know what to do here.');
}
</SCRIPT>
...
<DIV ID="mydivId">
<FORM NAME=theForm>
<INPUT TYPE=text NAME=x><BR>
<INPUT TYPE=text NAME=y><BR>
<INPUT TYPE=button VALUE="getDoc" onClick='getDoc(document.theForm.x.value,document.theForm.y.value)'>
</FORM>
</DIV>