Thread: need help plz
View Single Post
Old 02-05-2007, 09:39 AM   #3 (permalink)
newbie_paul
Recruit
 
Join Date: Feb 2007
Posts: 3
newbie_paul is on a distinguished road
thanx for the help man....i got it workin.....i have a small problem though.....when i hit the href in parent window it is refreshin the whole page..what should i do to not refresh the page and one more....what should i do to add one more form in the same page.......

parent window is........
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 is....
Quote:
<HTML>
<HEAD>
<TITLE>Stock List</TITLE>
<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="javascript:pick('AOL')">AOL</A></TD>
<TD><A HREF="javascript:pick('CSCO')">CSCO</A></TD></TR>
<TR><TD><A HREF="javascript:pick('CPQ')">CPQ</A></TD>
<TD><A HREF="javascript:pick('INTC')">INTC</A></TD></TR>
<TR><TD><A HREF="javascript:pick('NOK')">NOK</A></TD>
<TD><A HREF="javascript:pick('SUNW')">SUNW</A></TD></TR>
<TR><TD><A HREF="javascript:pick('LU')">LU</A></TD>
<TD><A HREF="javascript:pick('AMZN')">AMZN</A></TD></TR>
<TR><TD><A HREF="javascript:pick('T')">T</A></TD>
<TD><A HREF="javascript:pick('MSFT')">MSFT</A></TD></TR>
</TABLE>
</BODY>
</HTML>
plz check the javascript in both the files and lemme know what should be added to
1) not refresh the page when hittin the href in parent
2) how to add one more form.......

thanx for the great help man.....
newbie_paul is offline   Reply With Quote