deadlock Message Board
[ September Full List | Reply ]

Help required in Javascript
From Mahesh on 19 Sept '00
Hi,
I am trying to add an OPTION from a child window to its parent window's SELECT using JavaScript in IE5.5. I am unable to find an answer for this. If you can please mail me at m_narayana@hotmail.com.
Thanks in advance for your help
Regards,
Mahesh

I have two files test1.html which looks like:
<html>
<body>
<form name="New">
<select name="Att" multiple size="6">
</select>
<input type=button value="Add" onClick="displayFile('test2.html')">
</form>
<script language="JavaScript">
function displayFile(URL){
msg=open(URL,"Disp","toolbar=NO,scrollbars=yes,scrollable=yes,width=470,height=410");
}
</script>
</body>
</html>

and test2.html, which looks like:

<html>
<body>
testing
<input type=button value="Add Option" onClick="check()"></input>
<script language="JavaScript">
function check(){
jam = new Option('1','1');
opener.New.Att.options = new Array(1);
opener.New.Att.options[0] = jam;
window.close();
}
</script>
</body>
</html>




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive automatic replies by email)

Your Message