Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_discuss thread: How to pass value to the pop-up window


Message #1 by "cindy zhou" <czhou@w...> on Thu, 27 Feb 2003 14:08:16
Hi,

I am thinking to have a new window to pop up when I press a button in the 
current page. Is it possible to pass field value on the current page to 
that pop-up window? I would appreciate your help.

Cindy
Message #2 by "SEAK, Teng-Fong" <tfseak@f...> on Thu, 27 Feb 2003 16:16:29 +0100
	Yes, and there are at least four ways to do this.

1) Open the new window (and better wait a few seconds so that the new 
page
is completely loaded, or you could use the onload handler).  From the 
opener
window, you access the new window's fields in this way:
newwin.document.form_name.field_name.value
etc

2) Similar to 1).  Open the new window.  The new window can refer back 
to
opener window's field in this way :
opener.document.form_name.field_name.value
etc

3) Construct a query string (but be aware that its length shouldn't be 
too
long) in the opener window and pass it along the URL to the new window. 
 The
new window can then use
window.location.search
to retreive those values.

4) Similar to 3).  Construct a form or query string and send it along 
the
URL for the new window.  The server upon receiving the request, 
retrieves
the data and generates the necessary fields and values before sending 
the
resultant page back to your new window.

HTH

> -----Message d'origine-----
> De : cindy zhou [mailto:czhou@w...]
> Envoy=C3=A9 : jeudi 27 f=C3=A9vrier 2003 15:08
> =C3=80 : asp_discuss
> Objet : [asp_discuss] How to pass value to the pop-up window
>
>
> Hi,
>
> I am thinking to have a new window to pop up when I press a
> button in the
> current page. Is it possible to pass field value on the
> current page to
> that pop-up window? I would appreciate your help.
>
> Cindy
Message #3 by "SEAK, Teng-Fong" <tfseak@f...> on Thu, 27 Feb 2003 16:23:25 +0100
	One more thing.  For the first three suggestions, you could consult
JavaScript FAQ at
http://p2p.wrox.com/javascript/faq.asp

> -----Message d'origine-----
> De : SEAK, Teng-Fong [mailto:tfseak@f...]
> Envoy=C3=A9 : jeudi 27 f=C3=A9vrier 2003 16:16
> =C3=80 : asp_discuss
> Objet : [asp_discuss] RE: How to pass value to the pop-up window
>
>
> 	Yes, and there are at least four ways to do this.
>
> 1) Open the new window (and better wait a few seconds so that
> the new page
> is completely loaded, or you could use the onload handler). 
> From the opener
> window, you access the new window's fields in this way:
> newwin.document.form_name.field_name.value
> etc
>
> 2) Similar to 1).  Open the new window.  The new window can
> refer back to
> opener window's field in this way :
> opener.document.form_name.field_name.value
> etc
>
> 3) Construct a query string (but be aware that its length
> shouldn't be too
> long) in the opener window and pass it along the URL to the
> new window.  The
> new window can then use
> window.location.search
> to retreive those values.
>
> 4) Similar to 3).  Construct a form or query string and send
> it along the
> URL for the new window.  The server upon receiving the
> request, retrieves
> the data and generates the necessary fields and values before
> sending the
> resultant page back to your new window.
>
> HTH

  Return to Index