On Fri, 28 Jan 2005 11:18:58 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "Susan Bradeen" <[EMAIL PROTECTED]>
> > Yes, true. So the page loads, and the user types something into the
> > userField1, and then clicks on the link next to userField2. Depending
> > on what the value is in userField1, you get different userField2
> > selections, which appears in the window opened by the javascript. So I
> > need to pass the value of userField1 at the moment the user clicks the
> > link for userField2. Problem is, I don't see how to get that value and
> > put it in to the url for link.
> 
> If it were _just_ a link, you wouldn't have a problem, it would all be on
> the client side.  What would this look like without Struts?  I tried to put
> it together... see if this makes any sense.  (With apologies for any errors,
> my JavaScript is done via copy/paste/appeal to comp.lang.javascript for
> corrections):
> 
> <input type="text" name="userField1" "/>
> <a href="#" onClick="doSomething();" >
> doSomething() {
>     var linkTarget = "/promptUserField.do?parent=" +
> document.forms[0].userField1.value;
>    window.open( linkTarget );
> }
> 
> If you really need the rewrite, then have that link submit the form to an
> Action that can read the userField1 value and decide what options to display
> in the popup window.  When the user closes the popup, it can again submit
> and update the form on the 'parent' page.
> 

Good ideas! I haven't had much experience with javascript so far, as
you probably guessed. Thanks so much, Wendy.

> --
> Wendy Smoak
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to