dragance Posted May 4, 2006 Share Posted May 4, 2006 I pass a variable to new window and it works for me in this way.[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<form name="calculator" action="http://www.domain.com/calc.php" target="_blank" method="post">...[/quote]but I want to make that new window with fixed width & height.Can I do this?Thanks. Link to comment https://forums.phpfreaks.com/topic/9069-pass-variable-to-new-window/ Share on other sites More sharing options...
.josh Posted May 4, 2006 Share Posted May 4, 2006 not with php. you need to use javascript for that.include this function..umm.. wherever. Link to comment https://forums.phpfreaks.com/topic/9069-pass-variable-to-new-window/#findComment-33371 Share on other sites More sharing options...
craygo Posted May 4, 2006 Share Posted May 4, 2006 You can do what you want with a javascriptHere is and exampleplace this after your <html> and change what you want for the settings[code]<script language="JavaScript">popup_win = null;function newwin() { popup_win = window.open('', 'popup_win', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, resizable=yes, copyhistory=no, scrollbars=no, width=500, height=500');}</script>[/code]in your form tag use this but change the action setting to the page you want[code]<form target=popup_win method="POST" action="mypage.php" onsubmit="newwin()">[/code]Try it outRay Link to comment https://forums.phpfreaks.com/topic/9069-pass-variable-to-new-window/#findComment-33372 Share on other sites More sharing options...
.josh Posted May 4, 2006 Share Posted May 4, 2006 hey how come it won't let me post my javascript? i posted pretty much the same thing as you craygo but it wouldn't let me post the script :( Link to comment https://forums.phpfreaks.com/topic/9069-pass-variable-to-new-window/#findComment-33373 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.