Jump to content

Pass variable to new window


dragance

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.


Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.