Posted By:
Dave_Eaves
Posted On:
Thursday, March 29, 2001 04:06 PM
The way that I've done this in the past is by creating a form on the html page that has a target the same as the window name that you're going to open. You can then write an openPostWindow function to be called on submit (this way you can specify a size and other attributes for your new window). I will attempt to provide an example below. Please note that I'm providing it without having tested this example first.
function openPostWindow()
{
// Note you have to point at some intermediary page first when the form posts the location of the new window will be replaced by your form's action.
window.open("blank.html","PostWindow","status,titlebar,directories,location,statusbar,menubar,toolbar,scrollbars,resizable");
}
I don't want the HTML to get messed up so I will just explain what the attributes of your form should be
method="POST"
action=
onsubmit="openPostWindow();"
target="PostWindow"
If this doesn't work right try using an onclick on the submit button to launch the window prior to the form submitting, or optionally you can call the javascript function onclick of a button and call
document.forms[0].submit();
after opening the window.
Hope this helps!