| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 
 |  
     function getXhr(){
     		var xhr = null; 
			if(window.XMLHttpRequest){ // Firefox et autres
				xhr = new XMLHttpRequest();
				 //alert('new XMLHttpRequest'); 
			}
			else if(window.ActiveXObject){ // Internet Explorer 
				   try {
			                xhr = new ActiveXObject("Msxml2.XMLHTTP");
			                //alert('new activeXObject');
			       } catch (e) {
			                xhr = new ActiveXObject("Microsoft.XMLHTTP");
 
			       }
			}
			else { // XMLHttpRequest non support� par le navigateur 
				   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
				   xhr = false; 
			} 
          return xhr;
	}
 
 
     function go() {
 
     		var xhr = getXhr();
				// On d�fini ce qu'on va faire quand on aura la r�ponse
 
 
				xhr.onreadystatechange = function(){
 
					//alert('debug0 ='+xhr.readyState);
					// On ne fait quelque chose que si on a tout re�u et que le serveur est ok
					if(xhr.readyState == 4 /* && xhr.status == 200*/){
						//alert('debug1');
						leselect = xhr.responseText;
						//alert('leselect:'+leselect);
						// On se sert de innerHTML pour rajouter les options a la liste
						document.getElementById('utilisateurs').innerHTML = leselect;
					}
				}
 
				// Ici on va voir comment faire du post
				xhr.open("POST","/jcms/integration/demande/listeUtilisateurs.jsp",true);
				//xhr.open("POST","/intranet/integration/demande/formulaireDemande.jsp",true);
				// ne pas oublier �a pour le post
				xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
				// ne pas oublier de poster les arguments
				// ici, l'id de la structure
				sel = document.getElementById('structures');
				idstruc = sel.options[sel.selectedIndex].value;
				//alert('idStruc = '+idstruc);
				xhr.send("idStructure="+idstruc);
 
     }
 
     function cacherChckBox(entree) {
 
 
			//alert("entree: "+entree);     		
					if(entree == "chckMut"){
							if(document.getElementById('checkboxDep').style.visibility == 'hidden'){
 
								document.getElementById('checkboxDep').style.visibility = 'visible';
							}
							else{
								document.getElementById('checkboxDep').style.visibility = 'hidden';
							}
 
						}
						if(entree == "chckDep"){
 
							if(document.getElementById('checkboxMut').style.visibility == 'hidden'){
 
								document.getElementById('checkboxMut').style.visibility = 'visible';
							}
							else{
								document.getElementById('checkboxMut').style.visibility = 'hidden';
							}
 
						}
 
 
				//document.getElementById('checkboxDep').style.visibility = 'hidden';
 
 
 
     }     
 
  </script> 
 
</head>
 
<body >
 
 
 
 
<h1 class="boTitle"> 
  Formulaire de demande d'installation - Accueil 
</h1>
 
					<br><br>
 
					<!--  Onglet formulaire -->
 
					<div class="tab-pane" id="mainTab">
 
 
					  <div class="tab-page">
			    		<h2 class="tab"><img src='images/jalios/icons/edit.gif' class='icon' alt='P' title='Contenu' /> Utilisateur</h2>  
 
			   			<form id="formSaisie" method="POST">
			   			<input type="hidden" name="nomPage" id="nomPage" value="formulaireDemande" />
 
			        <table  cellspacing='3' cellpadding='3' border='0' class='FicheIndividuelle'>                     
 
			          <tr>
 
			            <td>
			            <%
                                       List messages = (List)request.getAttribute("messages");
                                       if (messages!=null) {                  
                                                Iterator it = messages.iterator();
                                                while (it.hasNext()) {
                                                        String message = (String)it.next();                                     
                                    %>
			            		<font color="red"><h3><b><%=message %></b></h3><br /></font>
			            <%
                                          } // end while
                                       } // end if
                                    %>
 
									<%
                                                                                Exception e = (Exception)request.getAttribute("exception");
                                                                                if (e!=null) {
                                                                                        %>
											<font color="red"><%= e.getMessage() %><br /></font>
											<%
                                                                                }
                                                                        %>
 
						<br><br>
 
						<!--  partie d'identification -->
 
 
 
					  		<table border cellspacing="10px" align="center" width="60%">
					  			<tr >
					  				<td > 
 
								  		<select name="structures" id="structures" onChange="go()">
								  		<option value="vide">Liste structures</option> 
										<% Iterator it1 = GetList.getStructureList().iterator(); 
                                                                                String s=null; 
                                                                                while(it1.hasNext()){ 
                                                                                Structure struct =(Structure)it1.next(); 
                                                                                s=struct.getNom(); 
                                                                                %> 
										<option value="<%=struct.getId()%>"> <%=s%></option> 
										<%}%> </select>
 
									</td>
									<td >
										<div id='utilisateurs' style='display:inline'>
 
										<select name="utilisateurs" id="selectUtil"  > 
 
 
										   	 	<option value="vide"> -------------------- </option>
 
 
										</select>
										</div>
									</td>	
 
 
								</tr>
								<tr>
									<td colspan="2"> 
											<table border="0" align="center" >
											<tr>
												<td> </td>
											</tr>
											<tr>
												<td><input  type="checkbox" id="chckLog" name="chckLog" > installation logicielle </input></td>
											</tr>
											<tr>
												<td><input type="checkbox" id="chckMat" name="chckMat" > installation matérielle </input></td>
											</tr>	 	
							  				<tr>
												<td><div id="checkboxMut" style="visible"><input type="checkbox" id="chckMut" name="chckMut" onClick="cacherChckBox('chckMut')"> Mutation </input></div></td>
											</tr>
							  				<tr>
												<td><div id="checkboxDep" style="visible"><input type="checkbox" id="chckDep" name="chckDep" onClick="cacherChckBox('chckDep')"> Départ </input></div></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
								</tr>
								<tr>
 
									<td >
									<div class="UI_EDITOR_TEXTFIELD">
 
			  							<input type="submit" class='formButton mainButton' name="validerChoix" id="validerChoix" value="Valider mes choix"  />
 
			  					 </div>
			  					 </td> 
								</tr>
							</table>	
 
 
 
 
			           </td>
			          </tr>
			  			</table>
			  			</form>
			  	  </div>
 
 
 
 
 
</div>
</body> | 
Partager