function choix(select){
  var choixSelect;
  if( select.name == 'selectCMP'){
    choixSelect = new getObj("choixSelect");
    choixSelect.obj.value = '1';
  }
  else if( select.name == 'selectSPE'){
    choixSelect = new getObj("choixSelect");
    choixSelect.obj.value = '2';
  }
  else alert('Erreur!!!');

  alert(choixSelect.obj.value);
  document.SaisieAgentForm.submit();
}
This function is used to know on which select the user interact.

----- Original Message -----
From: "Patrice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:29 PM
Subject: Re: Problem with pre-select html:select Tag


> Hi Yann,
>
> Should I know what is in your javascript function choix(this) ?
>
> Patrice
>
> ----- Original Message -----
> From: "Yann Verlynde" <[EMAIL PROTECTED]>
> To: "Struts" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 5:15 PM
> Subject: Problem with pre-select html:select Tag
>
>
> > Hello,
> >
> > I have already read a lot of posts to implements that but I don't
> > understand.
> >
> > Process: When the user select a value on the combo select, the page
> refresh
> > and fill a new select tag by a content which depend on the value
selected
> by
> > the user.  The second select tag is well filled but the first is not pre
> > select on the value clicked by the user.
> >
> > I don't understand why my select tag doesn't pre-select the good value.
My
> > form class is in session scope and when I test my value it seems that it
> has
> > the good value.
> > Does anyone can help me please?
> >
> > <%=request.getParameter("selectCMP")%>
> > <html:select property="selectCMP" onchange="choix(this)">
> >   <logic:notPresent name="selectCMP" scope="request">
> >     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
> >   </logic:notPresent>
> >   <html:options collection="CMP" labelProperty="CMP_LIB"
> property="CMP_ID"/>
> > </html:select>
> >
> > Thanks in advance
> >
> > Yann VERLYNDE
> > Ing�nieur d'Etudes
> > Oxade Ing�nierie
> > 13, Place Kossuth
> > 75009 PARIS
> >
> > Tel  : 01 42 82 99 38
> > Fax : 01 42 82 99 35
> > www.oxade.com
> >
> >
> > --
> > 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