Jump to content

[SOLVED] posting parameters to child window...


whirlpool6

Recommended Posts

Just prepare form with hidden fields and submit it just after opening new window.

You just have to set the same target as is the new window's name.

<html>
<script>
  function OpenNewWindow() {
    window.open('about:blank', 'NewWindow', '...');
  }
</script>
<body>
<form name="MyHiddenForm" method="post" action="test3.php" target="NewWindow">
<input type="hidden" name="var1" value="val...">
<input type="hidden" name="var2" value="val...">
</form>
<button type="button" onclick="OpenNewWindow(); document.MyHiddenForm.submit();">Open new window</button>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.