Bonjour,
j'ai deux form, pour chacun, il y a deux select
une fois le premier select est modifies, le contenu du deuxieme sera mis a jour
pour cela j'utilise le onchange du select
voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
    <html:form action="EditShortList.do?do=">
 
Short list &nbsp;: &nbsp; &nbsp;&nbsp;
<html:select property="selectedAddShortlistId" onchange="javascript:launchRefresh(this,'EditShortList.do?do=refreshOrShortList')">
									<html:optionsCollection property="shortListsAdd" value="orshortlistId" label="orshortlistNom" />
								</html:select>
 
&nbsp; &nbsp; OR :
<html:select property="selectedAddOrId">
									<html:optionsCollection property="addOrList" value="orId" label="orCode" />
								</html:select>
 
&nbsp; <html:submit value="ajouter"/>
 
                </html:form>
et le deuxieme form :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
    <html:form action="EditShortList.do?do=">
 
Short list &nbsp;: &nbsp; &nbsp;&nbsp;
              <html:select  property="selectedDeleteShortlistId"  onchange="javascript:launchRefresh(this.form,'EditShortList.do?do=refreshOrShortList')" style="width: 127px;">
              <html:optionsCollection property="shortListsDelete" value="orshortlistId" label="orshortlistNom" />
              </html:select>
&nbsp; &nbsp; OR :
              <html:select  property="selectedDeleteOrId" style="width: 127px;">
              <html:optionsCollection property="delOrList" value="orId" label="orCode" />
              </html:select>
&nbsp; <html:submit value="supprimer"/>
 
                </html:form>
-fonction javascript :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
 
function launchRefresh(theForm,url) 
{	
alert(url);
 
	theForm.action =url;
	theForm.submit();
 
}
lors du changement de valeur du premier select, l'action pour le deuxieme formulaire , elle passe, par contre pour le premier ,
il appelle la fonction , mais pas l'action !
avez vous une idee?

Merci