Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Communicating with the creator


Message #1 by "Peter Byers" <pb@s...> on Sat, 26 May 2001 20:19:40
If the field in the opener window is called hiddenField and is in a form
named myForm then the code in the second window is:
function updateOpener(newValue)
{
  self.opener.document.forms["myForm"].hiddenField.value = newValue;
 return;
}
Call this function inserting the new value for the field in the onclick
event of the button.

Joe
----- Original Message -----
From: "Peter Byers" <pb@s...>
To: "javascript" <javascript@p...>
Sent: Saturday, May 26, 2001 8:19 PM
Subject: [javascript] Communicating with the creator


> Hi
> I have a browser window open that contains code to open a second smaller
> "PopUp" window.
>
>
>
> In that second window, I can get details of the "Opener" - that second
window
> contains two buttons (both of which perform some checks and then close
that second
> window).
>
> HOW CAN I gget the second window to update a "Hidden Form variable" in the
First
> window (with different values depending on which button was pressed in the
second Window)
>
> Thank you in anticipation (I hope)
> Pete (Northolt UK)
>
>


  Return to Index