Window.open and pass parameters by post method problem
<p>Hi<br>
With window.open method I open new site with parameters, which I have to pass by post method.I've found solution, but unfortunately it doesn't work. This is my code:  </p>

<pre><code>&lt;script  type="text/javascript"&gt;    
function openWindowWithPost(url,name,keys,values)
{
var newWindow = window.open(url, name);
if (!newWindow) return false;
var html = "";
html += "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;form id='formid' method='post' action='" + url +"'&gt;";
if (keys &amp;&amp; values &amp;&amp; (keys.length == values.length))
for (var i=0; i &lt; keys.length; i++)
html += "&lt;input type='hidden' name='" + keys[i] + "' value='" + values[i] + "'/&gt;";
html += "&lt;/form&gt;&lt;script type='text/javascript'&gt;document.getElementById(\"formid\").submit()&lt;/sc"+"ript&gt;&lt;/body&gt;&lt;/html&gt;";
newWindow.document.write(html);
return newWindow;
}
&lt;/script&gt;  
</code></pre>

<p>Next, I create arrays:  </p>

<pre><code>&lt;script type="text/javascript"&gt;    
var values= new Array("value1", "value2", "value3") 
var keys= new Array("a","b","c") 
&lt;/script&gt;  
</code></pre>

<p>And call function by:  </p>

<pre><code>&lt;input id="Button1" type="button" value="Pass values" onclick="openWindowWithPost('test.asp','',keys,values)" /&gt;   
</code></pre>

<p>But, when I clik on this button, the site test.asp is empty (of course I try get pass values - Request.Form("b")).<br>
How could I solve this problem, why I can't get pass values?  </p>

<p>Thanks for help.</p>

<p>Regards</p>
