BUTTON THAT SUBMITS FORM DATA TO A NEW WINDOW; without modifying the form tag.

I am trying to post data to a new window; with using the form tag.




One method among many I have found on the net.
function postToPopup( uname, pwd )
{
var form = document.getElementById("hiddenForm");
form.username.value = uname;
form.password.value = pwd;
window.open( "", "MYPOPUP", "width=600,height=400" );
form.submit();
}


<form id="hiddenForm" target="MYPOPUP" method="post" action="http://anyOldSiteAtAll.com/somepage.xxx">
<input type="hidden" name="username"/>
<input type="hidden" name="password"/>
</form>

The issue with this is that I have no access to the main form; this needs to happen without modifying the form tag at all. It seems like all the solutions what you to modify the form tag.
-------------------------------------------------------------------






I did try this out in the button instead of modifying the form tag but i can only pass values via get and i can't grab any form elements to pass on this way.
<script type="text/javascript">
// M- Opens up new window and not a TAB.
function OpenForm(x, w, h, name, URL) {
var settings = 'width=' + w + ',height=' + h + ',scrollbars=yes,toolbars=no, directories=no,left=0, top=0';
while (URL.indexOf(" ") != -1)
URL = URL.replace(" ", "%20");
mywin = "win" + x;
mywin = window.open(URL, name, settings);
}
</script>

This works but will not do a submit to a a new window; it just opens one up. I can pass values in a query string though but no post.
<input type='button' name='PhoneCall' id='PhoneCall' value='Phone Call' onClick="OpenForm(4,'800','500','OOSTITLEPhone','TITLE_PHONECALL_frm.aspx?TitleID=869&CustPhone=111-222-3333');">
------------------------------------------------------------------







I think if I can combine the two into one it might work; something like this:
<script type="text/javascript">
// M- Opens up new window and not a TAB.
function postToPhone(x, w, h, name, URL) {
var settings = 'width=' + w + ',height=' + h + ',scrollbars=yes,toolbars=no, directories=no,left=0, top=0';
while (URL.indexOf(" ") != -1)
URL = URL.replace(" ", "%20");
mywin = "win" + x;
mywin = window.open(URL, name, settings);

// can do some form validation here then submit.

form.submit();
}
</script>


<input type='button' name='PhoneCall' id='PhoneCall' value='Phone Call' onClick="postToPhone(4,'800','500','OOSTITLEPhone','PHONECALL_frm.aspx');">

With this I am not sure how or if it will just post all the request.form data to the new page? Do I have to grab each element I want to pass? Like a regular form post to itself would it just pass all the form data over?

This is what I am unsure about.



Anyone have any ideas?

Thanks.