ok først hovedfilen
--------------------------index.html-----------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"><html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Create new option in form in another win</title>
<script language="javascript">
myWin = window.open("reciever.html","RecieverWin","width=200,height=200")
function createOption(){
df = document.forms[0]
val1 = df.nyVaerdi.value
val2 = df.nyTekst.value
myWin.createTheOption(val1,val2)
return false
}
</script>
</head>
<body>
<form name=myForm onSubmit="return createOption()">
<table border=0 cellspacing=0 cellpadding=2>
<tr><td>option value</td><td colspan=2>option tekst</td></tr>
<tr><td><input type=text name=nyVaerdi size=30></td><td><input type=text name=nyTekst size=30></td><td><input type=submit name=submit value="opret ny variabel"></td></tr>
</table>
</form>
</body>
</html>
----------------------------------------------reciever.html-----------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"><html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Reciever</title>
<script language="javascript">
function createTheOption(val1,val2){
dfs = document.forms[0].mySelect
alert(dfs.options.length)
dfs.options[dfs.options.length] = new Option(val2,val1)
}
</script>
</head>
<body>
<FORM>
<SELECT NAME=mySelect>
</SELECT>
</FORM>
</body>
</html>