struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Childers" <jchild...@hotels.com>
Subject RE: Réf. : Re: How to pass parameters to a javascript popup
Date Thu, 03 Jul 2003 15:05:35 GMT
Also, popup windows can reference their parent window via JavaScript. Therefore if the data
you need in your popup is on the original page then you can access it using a DOM reference.
From within the popup window you would do something along the lines of:

var myVar = window.opener.document[theNameOfTheHtmlForm].formelement.value;

-= J


> -----Original Message-----
> From: Adam Hardy [mailto:ahardy.struts@cyberspaceroad.com]
> Sent: Thursday, July 03, 2003 9:53 AM
> To: Struts Users Mailing List
> Subject: Re: Réf. : Re: How to pass parameters to a javascript popup
> 
> that was only a very rough version for sake of an example. Does the 
> javascript work? I mean, does the new window pop up? if so, 
> then do you 
> see the correct URL in the new browser window?
> 
> meissa.Sakho@assetmanagement.natexis.fr wrote:
> > Adam,
> > have you tried this with an action url on parameter. 
> Something like :
> > <a href="help"
> > onclick="openWindow('myaction.do?task=doThis');return 
> false;">Help</a>
> > 
> > I'm asking this question because It's not working with me.
> > I seems my url action is not recognized with the openWindow call.
> > 
> > any suggestion ?
> > 
> > Meissa
> > 
> > Adam Hardy <ahardy.struts@cyberspaceroad.com>
> > 03/07/2003 16:24
> > Veuillez répondre à "Struts Users Mailing List"
> > 
> > 
> >         Pour :  Struts Users Mailing List 
> <struts-user@jakarta.apache.org>
> >         cc :
> >         Objet : Re: How to pass parameters to a javascript popup
> > 
> > 
> > Brian McSweeney wrote:
> > 
> >><html:link href="" paramId="helpMessage" staticvalue="helpMessage1"
> >>
> >>onClick="openWindow('poppedup.jsp','popup','scrollbars=yes,w
> idth=1000,
> >>height=500,left=10,top=100')">
> >></html:link>
> >>
> > 
> > Try
> > 
> > <a href="help"
> > onclick="openWindow('poppedup.jsp?helpMsg=helpMsg1');return
> > false;">Help</a>
> > 
> > The return false will stop the link doing any redirecting 
> of the current
> > window, and the popup will obtain the URL + querystring as 
> defined in
> > the javascript.
> > 
> > Adam
> > 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message