Sorry ich hatte mich versehen. nicht "document.", sondern "parent."
Das opener heist auf deutsch "Öffnender" oder so ähnlich. Auf jeden Fall ist es das Fenster, von dem aus das Popup geöffnet wurde.
Ich hab dir mal nen fertigen Quelltext aufgeschrieben:
Dateiname: egal
1:
2:
3:
4:
5:
6:
7:
8: | <html>
<body>
<form name="formular">
<input type="text" name="bilder">
</form>
<a href="#" onClick="javascript:open('popup.html','_blank','width=500,height=200')">Bilderwahl</a>
</body>
</html> |
Dateiname: popup.html
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25: | <html>
<head>
<script language="JavaScript">
<!--
function bild(x)
{
if(x == 1)
{
parent.opener.formular.bilder.value = "Bild 1";
self.close();
}
if(x == 2)
{
parent.opener.formular.bilder.value = "Bild 2";
self.close();
}
}
//-->
</script>
</head>
<body>
<a href="javascript:bild(1)">Bild 1</a><br>
<a href="javascript:bild(2)">Bild 2</a><br>
</body>
</html> |
bei mir mit IE6 funktioniert das so
Ich hoffe du kannst darin das für dich wichtige finden.
Gruß
Paul