By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

controlling look of new window on submit

P: n/a
i'm submitting a form via javascript.

form.submit();

i'd like the results of the POST to open in a new window (i can set the
target)
but while configuring certain windows frame features
(e.g. disable menu and set-size).

i can do this for GETs, with

window.open('link'....);

but not for POSTs.

help!

Jun 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 23 Jun 2006 11:04:12 +0000, ppcguy wrote:
i'm submitting a form via javascript.

form.submit();

i'd like the results of the POST to open in a new window (i can set the
target)
but while configuring certain windows frame features (e.g. disable menu
and set-size).

i can do this for GETs, with

window.open('link'....);

but not for POSTs.

help!


This is untested, but gives you the general idea.

function mySubmit() {
var newWin = window.open('','zaphod',...);
newWin.focus();
document.myForm.target = 'zaphod';
document.myForm.submit();
// optional reset
// document.myForm.target = self.name;
}

<form name="myForm" onSubmit="mySubmit();" action="..." method="POST">
....
</form>

Jun 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.