Forum Moderators: open
To say the truth I would really like sth like a "confirm" window with two buttons: proceed and cancel. Both of them need to close the window and proceed has to submit the window form as well.
How can I do that?
Looking for any answer (don't have much experience with new windows, never used them before).
Michal Cibor
PS. I use PHP to create the parent window.
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Hello World</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2" >
<script type="text/javascript" language="JavaScript">
<!--
function js_window()
{
window.open('#', 'win', 'width=400', 'height=200', 'menubar=no', 'directories=no', 'location=no', 'toolbar=no');
window.document.write('<html><head></head><body><p>I wrote sth</p></body></html>');
}
//-->
</script>
</head>
<body>
<button onclick="js_window(); return false;">Okno</button>
</body>
</html>
BTW the new text is never ending to fully load.
Any answer would be appreciated
Michal Cibor
Sorry for splitting this in two (I am unable to post this message as a one). If one of you guys can glue it I would appreciate.
OK. I found it!
it should be: mywindow = window.open(...);
mywindow.document.write(...);
Thanks!