View Full Version : Modifying the Window

10-22-2007, 08:06 PM
I have this script I use

<form action=http://www.url.net/cgi-bin/mail/subscriber.cgi method="post" target="_new">

Is there a way to set the size of the "_new" window ??

10-22-2007, 08:23 PM
Actually you would use target="_blank" to open a new window but those methods are deprecated altogether. To open a new window and set its size you would use JavaScript. But be aware that people can switch that off in part or entirely (I, for example, have enabled JS but switched off any possibility for scripts to change my window size and/or statusbar content).

<form … onsubmit="window.open('URL','height=100,width=200')">


10-22-2007, 09:02 PM
That does not work It stills opens in a full window I think do to it being a form that does not work??

Can you post the complete link i need to use as maybe I am doing it wrong

THXS Steve

10-22-2007, 09:18 PM
Sorry, forgot the window name…

<form action="" method="get" onsubmit="window.open('http://google.com','windowname','height=100,width=200');">

You can leave the window name value out but you need to include the quotes.

10-22-2007, 09:28 PM
That brings up the signup box

Please go to http://www.cruisevacationcenter.net/mail.html

Just hit send and watches what happens

I think this can not be done BUT maybe


10-22-2007, 09:32 PM
I don’t see the code implemented that I proposed above? And if I add it using my web developer toolbar it does exactly what you want.

Ah, hang on… you want to display the error message if someone is leaving out the address? That would be different then… hang on, need to try it myself.