Thanks for the hint! This JS function solves the problem:


<script language="JavaScript">
<!--
    function go (x)
    {
        document.forms['udmForm'].submit();
    }
//-->


Best regards,
Bernhard


> -----Urspr�ngliche Nachricht-----
> Von: Don Saxton [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 30. Oktober 2001 18:57
> An: Struts Users Mailing List
> Betreff: Re: JavaScript event handler of <html:select>
>
>
> I meant in your onChange javascript
>     selector.options[x].selected = true;
> However, now I see that request to action  udm2.do in script may
> give you a
> whole new ActionForm.
>
> Instead, IMO, you want to submit the form. so javascript:submit().
>
> ----- Original Message -----
> From: "Bernhard J. Hirschmann" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 30, 2001 12:11 AM
> Subject: AW: JavaScript event handler of <html:select>
>
>
> >
> > Hi Don,
> >
> > thanks for your help...
> >
> >
> > > what happens if in your go function you set the selected value to true
> > > before calling your action?
> >
> >
> > HOW should I do that? May you give me a code sniplet?
> >
> > Regards,
> > Bernhard
> >
> >
> > >
> > > ----- Original Message -----
> > > From: "Bernhard J. Hirschmann" <[EMAIL PROTECTED]>
> > > To: "Struts-User" <[EMAIL PROTECTED]>
> > > Sent: Monday, October 29, 2001 8:27 AM
> > > Subject: JavaScript event handler of <html:select>
> > >
> > >
> > > >
> > > > I have a JavaScript event handler, which listens to the 'onchange'
> event
> > > of
> > > > a <html:select> element. Here the JSP code:
> > > >
> > > > <html:select property="selectedYear" onchange="go('udm2.do')">
> > > >     <html:options name="udmForm" property="lppVolumesYearList"/>
> > > > </html:select>
> > > >
> > > >
> > > >
> > > > The JavaScript handler looks like this:
> > > >
> > > > <script language="JavaScript">
> > > > <!--
> > > >     function go (x)
> > > >     {
> > > >       // this opens the link in the 3rd frame:
> > > >       parent.frames[2].location.href = x;
> > > >     }
> > > > //-->
> > > > </script>
> > > >
> > > >
> > > >
> > > > When I change now the selection the action "udm2.do" is called.
> > > This works
> > > > fine so far. The only problem is, that the changed value of my
> selection
> > > > isn't updated in my form bean, so the old value is used. :(
> > > >
> > > > I think I should manually put this value into the form bean, what do
> you
> > > > think? But how?
> > > >
> > > >
> > > > Regards
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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

Reply via email to