- Home
- Categorie
- Coding e Sistemistica
- Coding
- Upload a comparsa
- 
							
							
							
							
							
Upload a comparsaSalve a tutti, volevo chiedervi se potevate aiutarmi per uno script in js ... 
 Praticamente da un menù a tendina seleziono il numero di upload da fare, ed in base a quello mi fa comparire n upload da fare ...
 Mi potete aiutare ???
 Grazie in anticipo a tutti e andate sempre così che siete forti !!!;)
 
- 
							
							
							
							
							
<select onChange="Menu(this)"> 
 <option value="">--------</option>
 <option value="agenti">Agenti</option>
 <option value="reseller">Reseller</option>
 <option value="amministratori">Amministratori</option>
 </select><script language="JavaScript" type="text/javascript"> 
 <!--
 function Menu(links) {if (links[links.selectedIndex].value == "agenti") { 
 -->
 <?
 echo "ciaocuao"; // In realtà dovrebbe far vedere un form per l'upload
 ?>
 <!--return true; 
 }else { alert("Il campo."); }} --> 
 </script>
 
- 
							
							
							
							
							
ciao!  
 anche a me serve esattamente la stessa cosa !
 ho provato il codice di cui sopra..ma da un errore javascript una volta
 eseguito nel browser !?..
 confermi aztechs che sia corretto ?ciao, 
 grazie.
 
- 
							
							
							
							
							
Ciao ci sono riuscito adesso te lo posto ... questo funziona ... 
 Magari dovrai togliere qualcosa ma sostanzialmente è questo ...
 Però mi sa che è una procedura un pò da princiapianti infatti sarei contento se qualcuno mi potesse aiutare ...
 Ciao ...<th scope="row"><div align="left">Numero di uscite</div></th> <td><select onchange="Menu(this)"> <option value="">--------</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select></td> <td><script language="JavaScript" type="text/javascript"> 
 <!--
 var nuscite = links[links.selectedIndex].value;
 function Menu(links) {if (links[links.selectedIndex].value=="1") { 
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<td width="273"><select name="mese" size="1">');
 document.write('<option value="">--------</option>');
 document.write('<option value="01">Gennaio</option>');
 document.write('<option value="02">Febbraio</option>');
 document.write('<option value="03">Marzo</option>');
 document.write('<option value="04">Aprile</option>');
 document.write('<option value="05">Maggio</option>');
 document.write('<option value="06">Giugno</option>');
 document.write('<option value="07">Luglio</option>');
 document.write('<option value="08">Agosto</option>');
 document.write('<option value="09">Settembre</option>');
 document.write('<option value="10">Ottobre</option>');
 document.write('<option value="11">Novembre</option>');
 document.write('<option value="12">Dicembre</option>');
 document.write('</select></td></table>');
 document.write('<input type="file" name="documento"/>');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia">');
 document.write('</form>');
 }
 else if (links[links.selectedIndex].value=="2") {
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<input type="hidden" name="ccc" value=" ' + links[links.selectedIndex].value + ' ">');
 document.write('<td width="273"><select name="mese" size="1">');
 document.write('<option value="">--------</option>');
 document.write('<option value="01">Gennaio</option>');
 document.write('<option value="02">Febbraio</option>');
 document.write('<option value="03">Marzo</option>');
 document.write('<option value="04">Aprile</option>');
 document.write('<option value="05">Maggio</option>');
 document.write('<option value="06">Giugno</option>');
 document.write('<option value="07">Luglio</option>');
 document.write('<option value="08">Agosto</option>');
 document.write('<option value="09">Settembre</option>');
 document.write('<option value="10">Ottobre</option>');
 document.write('<option value="11">Novembre</option>');
 document.write('<option value="12">Dicembre</option>');
 document.write('</select></td></table>');
 document.write('<input type="file" name="documento"/>');
 document.write('<br>');
 document.write('<input type="file" name="documento2"/>');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia" />');
 document.write('</form>');
 }
 else if (links[links.selectedIndex].value=="3") {
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<input type="file" name="filep" id="documento" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento2" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento3" />');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia" />');
 document.write('</form>');
 }
 else if (links[links.selectedIndex].value=="4") {
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<input type="file" name="filep" id="documento" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento2" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento3" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento4" />');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia" />');
 document.write('</form>');
 }
 else if (links[links.selectedIndex].value=="5") {
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<input type="file" name="filep" id="documento" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento2" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento3" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento4" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento5" />');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia" />');
 document.write('</form>');
 }
 else if (links[links.selectedIndex].value=="6") {
 document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');document.write('<br>');
 document.write('<form method="post" action="aggfile.php" enctype="multipart/form-data">');
 document.write('<input type="file" name="filep" id="documento" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento2" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento3" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento4" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento5" />');
 document.write('<br>');
 document.write('<input type="file" name="filep" id="documento6" />');
 document.write('<br>');
 document.write('<input type="submit" name="button" value="Invia" />');
 document.write('</form>');
 }
 else {
 alert("è praticamente impossibile che appaia mai questo testo");
 }
 }
 //-->
 </script>