I
Iver Erling Årva
This works:
Main window:
<html>
<head>
<title>Untitled Document</title>
<script>
function openSub(){
window.open("Printwindow.htm","pw","height=200px, width=300px, left=300px,
top=300px")
}
</script>
</head>
<body>
<form id='form1' name="form1">
<input type="text" name="textfield">
<input type="button" name="Test" value="Test" onClick="openSub();">
</form>
</body>
</html>
Sub window:
<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript">
function sendMe(txt){
opener.form1.textfield.value=txt;
}
</script>
</head>
<body>
<form name="frm">
<input name="btn1" type="button" onClick="sendMe('test');" value="Test">
</form>
</body>
</html>
but if I change the window.open to window.showModalDialog it doesn't work
any more. How do I send stuff back to the calling window if the callee has
been opened as a modaldialog window?
Thanks
(e-mail address removed)
Main window:
<html>
<head>
<title>Untitled Document</title>
<script>
function openSub(){
window.open("Printwindow.htm","pw","height=200px, width=300px, left=300px,
top=300px")
}
</script>
</head>
<body>
<form id='form1' name="form1">
<input type="text" name="textfield">
<input type="button" name="Test" value="Test" onClick="openSub();">
</form>
</body>
</html>
Sub window:
<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript">
function sendMe(txt){
opener.form1.textfield.value=txt;
}
</script>
</head>
<body>
<form name="frm">
<input name="btn1" type="button" onClick="sendMe('test');" value="Test">
</form>
</body>
</html>
but if I change the window.open to window.showModalDialog it doesn't work
any more. How do I send stuff back to the calling window if the callee has
been opened as a modaldialog window?
Thanks
(e-mail address removed)