gpalat
05-10-2006, 02:56 AM
i have developes an .asp page tha contains 4 iframes.
in one iframe i include a form and 2 textarea fields. i have a button that submits the form but now i am asked to do sth different. i need to have a js that when called from different links it will submit the form to different pop up pages. tha code of the page is:
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<form name="form1" method="post">
<input name="fileid" type="hidden" value="<%=strfileid%>">
<tr>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="8"><img src="imgs/spacer.gif" width="8" height="1"></td>
<td><a href="#" onClick="markasterm(form1)"><img src="imgs/mark.gif" alt="mark as terminology" width="20" height="19" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<textarea name="source" cols="125" rows="4" readonly class="maintitle" id="textarea"><%=strsource%></textarea></td>
</tr>
<tr>
<td> <textarea name="target" cols="125" rows="4" class="content" id="target" onFocus="parent.termsframe.location='terminology_trans.asp?divid=<%=strdivision%>&indid=<%=strindustry%>&cmpid=<%=strcompany%>&sourselang=<%=strsourcelang%>&targetlang=<%=strtargetlang%>&checkterm=1&segmentid=<%=strsegmid%>';parent.alignedTM.location='alignedTM.asp?TMid=<%=stralignID%>'"><%=strtarget%></textarea></td>
</tr>
<tr>
<td align="center" class="content1">
<input name="Submit" type="submit" class="maintitle" value="Save Translation"></td>
</tr>
</form>
</table>
the markasterm js that is called is the following:
<script language="JavaScript" type="text/JavaScript">
<!--
function markasterm(form)
{
var popName = "formPopUp";
var popStyle = "width=400,height=400";
form.action = "converter.asp";
form.target = popName;
window.open("about:blank",popName,popStyle);
}
//-->
</script>
this js workes perfectly in a simple .asp page when it is called. but within the iframe i gives me the followin error:
"object does not support this property or method" refering to line form.target = popName;
any ideas of what is wrong with this.. plzzzz help me:)
thanx a lot
in one iframe i include a form and 2 textarea fields. i have a button that submits the form but now i am asked to do sth different. i need to have a js that when called from different links it will submit the form to different pop up pages. tha code of the page is:
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<form name="form1" method="post">
<input name="fileid" type="hidden" value="<%=strfileid%>">
<tr>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="8"><img src="imgs/spacer.gif" width="8" height="1"></td>
<td><a href="#" onClick="markasterm(form1)"><img src="imgs/mark.gif" alt="mark as terminology" width="20" height="19" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<textarea name="source" cols="125" rows="4" readonly class="maintitle" id="textarea"><%=strsource%></textarea></td>
</tr>
<tr>
<td> <textarea name="target" cols="125" rows="4" class="content" id="target" onFocus="parent.termsframe.location='terminology_trans.asp?divid=<%=strdivision%>&indid=<%=strindustry%>&cmpid=<%=strcompany%>&sourselang=<%=strsourcelang%>&targetlang=<%=strtargetlang%>&checkterm=1&segmentid=<%=strsegmid%>';parent.alignedTM.location='alignedTM.asp?TMid=<%=stralignID%>'"><%=strtarget%></textarea></td>
</tr>
<tr>
<td align="center" class="content1">
<input name="Submit" type="submit" class="maintitle" value="Save Translation"></td>
</tr>
</form>
</table>
the markasterm js that is called is the following:
<script language="JavaScript" type="text/JavaScript">
<!--
function markasterm(form)
{
var popName = "formPopUp";
var popStyle = "width=400,height=400";
form.action = "converter.asp";
form.target = popName;
window.open("about:blank",popName,popStyle);
}
//-->
</script>
this js workes perfectly in a simple .asp page when it is called. but within the iframe i gives me the followin error:
"object does not support this property or method" refering to line form.target = popName;
any ideas of what is wrong with this.. plzzzz help me:)
thanx a lot