PDA

View Full Version : reference the opener



daraptor
02-07-2007, 06:02 PM
hey guyz....this is regardin referencin the opener.....i mean..am tryin to populate a textbox in parent using child window......i got it all worked out....but when am tryin the add one more form it does'nt work..can anyone tell me y its not workin....am addin the html codes below...plz chk that and lemme know what is wrong.............

parent.html........
Quote:
<SCRIPT LANGUAGE="JavaScript">
<!--

function showList() {
sList = window.open("stocklist.html", "list", "width=150,height=210");
}

function remLink() {
if (window.sList && window.sList.open && !window.sList.closed)
window.sList.opener = null;
}

// -->
</SCRIPT><FORM NAME="stockForm">Enter your favorite tech stock:
<INPUT TYPE="text" NAME="stockBox" SIZE="10" VALUE="">
<INPUT TYPE="button" VALUE="list" onClick="showList()">
</FORM>
child window....(stockList.html)
Quote:
<SCRIPT LANGUAGE="JavaScript">
<!--

function pick(symbol) {
if (window.opener && !window.opener.closed)
window.opener.document.stockForm.stockBox.value = symbol;
window.close();
}

// -->
</SCRIPT>
</HEAD>
<BODY>
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="5">
<TR BGCOLOR="#cccccc"><TD><B>NYSE</B></TD><TD><B>NASDAQ</B></TD></TR>
<TR><TD><A HREF="javascriptick('AOL')">AOL</A></TD>
<TD><A HREF="javascriptick('CSCO')">CSCO</A></TD></TR>
<TR><TD><A HREF="javascriptick('CPQ')">CPQ</A></TD>
<TD><A HREF="javascriptick('INTC')">INTC</A></TD></TR>
<TR><TD><A HREF="javascriptick('NOK')">NOK</A></TD>
<TD><A HREF="javascriptick('SUNW')">SUNW</A></TD></TR>
<TR><TD><A HREF="javascriptick('LU')">LU</A></TD>
<TD><A HREF="javascriptick('AMZN')">AMZN</A></TD></TR>
<TR><TD><A HREF="javascriptick('T')">T</A></TD>
<TD><A HREF="javascriptick('MSFT')">MSFT</A></TD></TR>
</TABLE>
</BODY>
i tried renamin all the field names and form names ,,,but am gettin to work with the 1st form,but 2nd form is not workin....plz lemme know what i have to change in order to get this workin.....thnx.........