how to access document from a pop up
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

how to access document from a pop up

From: <soup_or_power@yahoo.com>
Date: Sat Jul 02 2005 - 02:05:26 CEST

Hi
I want to set the main document variables from a pop-up.

The code will be somewhat like this (sorry for mistakes) but it isn't
setting the main document's input box value. Please help!

<html>
<head>
<script language="javascript">
function mypopup() {
  var win=window.open(...);
  var message="<input type=text name=s1 value=yes
onclick=\"document.forms[0].myinput.value='value from popup'\">";
   win.document.write(message);
}
</script>
</head>
<form method=post action="myaction.html">
<input type=text name=myinput value='default value' onclick="popup()">
</form>
</body>
</html>
Received on Mon Oct 24 02:13:03 2005