Jump to content

Archived

This topic is now archived and is closed to further replies.

dragance

Pass variable to new window

Recommended Posts

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.


Share this post


Link to post
Share on other sites
not with php. you need to use javascript for that.

include this function..umm.. wherever.

Share this post


Link to post
Share on other sites
You can do what you want with a javascript

Here is and example

place 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 out

Ray

Share this post


Link to post
Share on other sites
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 :(

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.