I am using XHTML strict so the code for embedded page is like that:
I am trying to make the embedded page postback from the parent page. The js code works in firefox but not in IE (IE7, more specifically).
Here is the code in the parent page.
I found out that the code
frm=document.getElementById("ta1").document.forms['form1']
gave me a null object.
So how do I get the form object in IE?
Thanks in advance.
Seaport
Code:
<object id="ta1" data="ta.aspx?b=1&s=1" type="text/html">
</object>
I am trying to make the embedded page postback from the parent page. The js code works in firefox but not in IE (IE7, more specifically).
Here is the code in the parent page.
Code:
function test()
{
var frm;
if (navigator.appName == 'Microsoft Internet Explorer')
{
frm=document.getElementById("ta1").document.forms['form1'];
frm.__EVENTTARGET.value = 'NeedTA_Desc';
frm.__EVENTARGUMENT.value = '';
frm.submit();
}
else
{
frm=document.getElementById("ta1").contentDocument.getElementById("form1");
frm.__EVENTTARGET.value ='NeedTA_Desc';
frm.__EVENTARGUMENT.value = '';
frm.submit();
}
}
I found out that the code
frm=document.getElementById("ta1").document.forms['form1']
gave me a null object.
So how do I get the form object in IE?
Thanks in advance.
Seaport