Visualizzazione dei risultati da 1 a 10 su 10

Discussione: Controllo combo box

  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170

    Controllo combo box

    Salve ragazzi....premette che di java ne capisco pochissimo..
    ho una pagina asp che viene caricata da una serie di combo box con valore e nome progressivo, adesso mi servirebbe una funzione in grado di controllarmi prima dell'invio di questi dati se e stato selezionato un valore di un combo uguale ad un altro.
    Come potrei risolvere?

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170

  3. #3
    Moderatore di JavaScript L'avatar di br1
    Registrato dal
    Jul 1999
    Messaggi
    19,998

    Re: Controllo combo box

    Originariamente inviato da skylab
    ... se e stato selezionato un valore di un combo uguale ad un altro.
    ...
    Cioe'? :master:

    ciao
    Il guaio per i poveri computers e' che sono gli uomini a comandarli.

    Attenzione ai titoli delle discussioni: (ri)leggete il regolamento
    Consultate la discussione in rilievo: script / discussioni utili
    Usate la funzione di Ricerca del Forum

  4. #4
    Moderatore di Annunci siti web, Offro lavoro/collaborazione, Cerco lavoro L'avatar di cavicchiandrea
    Registrato dal
    Aug 2001
    Messaggi
    26,131

    Re: Controllo combo box

    Originariamente inviato da skylab
    Salve ragazzi....premette che di java ne capisco pochissimo..
    ho una pagina asp che viene caricata da una serie di combo box con valore e nome progressivo, adesso mi servirebbe una funzione in grado di controllarmi prima dell'invio di questi dati se e stato selezionato un valore di un combo uguale ad un altro.
    Come potrei risolvere?
    La pagina si crea dinamicamente? Se si posta la pagina come la riceve il browser (senza codice asp)

    Se invece la pagina e pre impostata (combo_1 combo_2 ecc) posta quella.

    Altrienti diventa difficile darti una soluzione al tuo problema.

    Cavicchi Andrea
    Problemi con javascript, jquery, ajax clicca qui

  5. #5
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170
    si la mia pagina viene generata dinamicamente tramite asp, quindi si puo verifica che alla fine dell'esecuzione si hanno una quantita di controlli combo da dover poi gestire.
    Vi mostro un esempio del risultato che ho in html:

    codice:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    	<head>
    		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
    		<meta name="generator" content="Adobe GoLive" />
    		<title>Gallery Section © Carlo Draisci</title>
    		<style type="text/css" media="screen"><!--.menu { color: black; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .testo { color: black; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .mini { color: black !important; font-size: 3px; font-family: Verdana, Helvetica, Arial; font-weight: normal; line-height: 3px; }
    .testonews { color: black; font-weight: normal; font-size: 9px; line-height: 11px; font-family: Verdana, Helvetica, Arial }
    .pallini { color: #999; font-weight: normal; font-size: 9px; line-height: 3px; font-family: Verdana, Helvetica, Arial }
    .testodata  { color: white; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotesto { color: #f39; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestobold  { color: black; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestoboldgrigio { color: #aaa; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestoboldrosso { color: red; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .testo-grigio { color: #4d4d4d; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .text          { color: black; font-weight: normal; font-size: 9px; font-family: Verdana, Helvetica, Arial; border: outset 1px #000; width: 250px; height: 20px }
    .form { border: outset 1px white }
    .line { line-height: 4px; border-top: 1px outset white; border-bottom: 1px outset white; }
    .lati { line-height: 4px; border-right: 1px outset white; border-left: 1px outset white; }
    .input.pulsante       { color: #888; font-variant: normal; font-size: 9px; font-family: Verdana, Helvetica, Arial; background-color: #fffffc; text-align: left; letter-spacing: 0; margin: 0; border: solid 1px #999; width: 60px; height: 15px }
    .input.combo { color: white; font-size: 9px; font-family: Verdana, Helvetica, Arial; font-variant: normal; background-color: black; text-align: left; letter-spacing: 0; margin: 0; width: 120px; height: 15px; border-color: #fff; }
    input.pulsante:hover {
    	background: #CCCCFF;
    }
    input.pulsante:active  { color: white; background-color: #aaa }
    --></style>
    		<csactions>
    			<csaction name="8433cf0" class="Open Window" type="onevent" val0="cio.html" val1="" val2="380" val3="150" val4="false" val5="false" val6="false" val7="false" val8="false" val9="false" val10="false" urlparams="1"></csaction>
    		</csactions>
    		<csscriptdict import="import">
    			<script type="text/javascript" src="file:///C:/Documents and Settings/Designer/Dati applicazioni/Adobe/Adobe GoLive/Settings8/JScripts/GlobalScripts/CSScriptLib.js"></script>
    		</csscriptdict>
    		<csactiondict>
    			<script type="text/javascript"><!--
    CSAct[/*CMP*/ '8433cf0'] = new Array(CSOpenWindow,/*URL*/ 'cio.html','',380,150,false,false,false,false,false,false,false);
    
    // --></script>
    		</csactiondict>
    	</head>
    	
    
    
    	<body bgcolor="black" link="white" vlink="white">
    		<table width="500" border="0" cellspacing="0" cellpadding="0">
    			<tr>
    				<td class="form" valign="top">
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr height="10">
    							<td width="198" height="10"></td>
    							<td width="25" height="10"></td>
    							<td width="140" height="10"></td>
    							<td height="10"></td>
    							<td width="10" height="10"></td>
    						</tr>
    						<tr height="40">
    							<td width="198" height="40">[img]pic/logo.jpg[/img]</td>
    							<td width="25" height="40"></td>
    							<td width="140" height="40"><span class="testodata">Pannel Gallery</span></td>
    							<td align="right" height="40"><span class="testodata">Pannel Clients</span></td>
    							<td align="right" width="10" height="40"></td>
    						</tr>
    					</table>
    				</td>
    			</tr>
    			<tr height="15">
    				<td valign="top" height="15"><span class="testodata"></span></td>
    			</tr>
    			<tr>
    				<td class="form" align="right" valign="middle">
    					<form action="gallery.asp" method="post" name="Form">
    						<select class="combo" name="Form" size="1">
    							<option value="Peoples" >People</option>
    							<option value="Models"  selected>Models</option>
    							<option value="Buildings">Buildings</option>
    							<option value="Objects">Objects</option>
    							<option value="Places">Places</option>
    						</select><input type="submit" name="submit" value="Load" />
    					</form>
    				</td>
    			</tr>
    			<tr height="10">
    				<td class="lati" valign="top" height="10"><span class="mini">a</span></td>
    			</tr>
    		</table>
    		<table width="500" border="0" cellspacing="0" cellpadding="0">
    			<tr>
    				<td class="form" valign="top">
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr>
    							<td class="line" align="center" width="50">[img]../img/kate1.jpg[/img]</td>
    							<td class="line" align="left" width="298"><span class="testodata">
    												    
    							   Null</span></td>
    							<td class="line" align="center" valign="middle" width="150">
    								<table width="150" border="0" cellspacing="0" cellpadding="0">
    									<tr>
    										<td>[img]pic/edit.jpg[/img]</td>
    										<td>[img]pic/delete.jpg[/img]</td>
    									</tr>
    								</table>
    							</td>
    						</tr>
    					</table>
    					
    
    
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr>
    							<td class="line" align="center" width="50">[img]../img/sarah.jpg[/img]</td>
    							<td class="line" align="left" width="298"><span class="testodata">
    												    
    							   Null</span></td>
    							<td class="line" align="center" valign="middle" width="150">
    								<table width="150" border="0" cellspacing="0" cellpadding="0">
    									<tr>
    										<td>[img]pic/edit.jpg[/img]</td>
    										<td>[img]pic/delete.jpg[/img]</td>
    									</tr>
    								</table>
    							</td>
    						</tr>
    					</table>
    					
    
    
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr>
    							<td class="line" align="center" width="50">[img]../img/untitled-1.jpg[/img]</td>
    							<td class="line" align="left" width="298"><span class="testodata">
    												    
    							   Null</span></td>
    							<td class="line" align="center" valign="middle" width="150">
    								<table width="150" border="0" cellspacing="0" cellpadding="0">
    									<tr>
    										<td>[img]pic/edit.jpg[/img]</td>
    										<td>[img]pic/delete.jpg[/img]</td>
    									</tr>
    								</table>
    							</td>
    						</tr>
    					</table>
    					
    
    
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr>
    							<td class="line" align="center" width="50">[img]../img/coco1.jpg[/img]</td>
    							<td class="line" align="left" width="298"><span class="testodata">
    												    
    							   Null</span></td>
    							<td class="line" align="center" valign="middle" width="150">
    								<table width="150" border="0" cellspacing="0" cellpadding="0">
    									<tr>
    										<td>[img]pic/edit.jpg[/img]</td>
    										<td>[img]pic/delete.jpg[/img]</td>
    									</tr>
    								</table>
    							</td>
    						</tr>
    					</table>
    					
    
    </p>
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr>
    							<td align="center">[img]pic/new_image.jpg[/img][img]pic/order.jpg[/img]</td>
    						</tr>
    					</table>
    				</td>
    			</tr>
    		</table>
    	</body>
    
    </html>

    Scusate tanto per la grandezza

  6. #6
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170
    ragazzi vi prego sono disperato..

  7. #7
    Moderatore di Annunci siti web, Offro lavoro/collaborazione, Cerco lavoro L'avatar di cavicchiandrea
    Registrato dal
    Aug 2001
    Messaggi
    26,131

    Re: Controllo combo box

    Originariamente inviato da skylab
    Salve ragazzi....premette che di java ne capisco pochissimo..
    ho una pagina asp che viene caricata da una serie di combo box con valore e nome progressivo, adesso mi servirebbe una funzione in grado di controllarmi prima dell'invio di questi dati se e stato selezionato un valore di un combo uguale ad un altro.
    Come potrei risolvere?
    @skylab scusa ma la pagina che hai postato non ci sono combobox c'è solo una select per poterti aiutare devi postare la pagina con le combo box oppure specifica cosa sono x te le combo box.
    Cavicchi Andrea
    Problemi con javascript, jquery, ajax clicca qui

  8. #8
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170
    Chiedo umilmente PERDONO per l'equivoco, nel copia incolla del codice non mi ero forse accorto di aver preso la pagina sbagliata:

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    	<head>
    		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
    		<meta name="generator" content="Adobe GoLive" />
    		<title>Untitled Page</title>
    		<style type="text/css" media="screen"><!--.menu { color: black; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .testo { color: black; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .mini { color: black !important; font-size: 3px; font-family: Verdana, Helvetica, Arial; font-weight: normal; line-height: 3px; }
    .testonews { color: black; font-weight: normal; font-size: 9px; line-height: 11px; font-family: Verdana, Helvetica, Arial }
    .pallini { color: #999; font-weight: normal; font-size: 9px; line-height: 3px; font-family: Verdana, Helvetica, Arial }
    .testodata  { color: white; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotesto { color: #f39; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestobold  { color: black; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestoboldgrigio { color: #aaa; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .titolotestoboldrosso { color: red; font-weight: bold; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .testo-grigio { color: #4d4d4d; font-weight: normal; font-size: 10px; line-height: 12px; font-family: Verdana, Helvetica, Arial }
    .text          { color: black; font-weight: normal; font-size: 9px; font-family: Verdana, Helvetica, Arial; border: outset 1px #000; width: 250px; height: 20px }
    .form { border: outset 1px white }
    .line { line-height: 4px; border-top: 1px outset white; border-bottom: 1px outset white; }
    .lati { line-height: 4px; border-right: 1px outset white; border-left: 1px outset white; }
    .input.pulsante       { color: #fff; font-variant: normal; font-size: 9px; font-family: Verdana, Helvetica, Arial; background-color: #000; text-align: left; letter-spacing: 0; margin: 0; border: solid 1px #999; width: 60px; height: 15px }
    .input.combo { color: white; font-size: 9px; font-family: Verdana, Helvetica, Arial; font-variant: normal; background-color: black; text-align: left; letter-spacing: 0; margin: 0; width: 60px; height: 15px; border-color: #fff; }
    input.pulsante:hover {
    	background: #CCCCFF;
    }
    input.pulsante:active  { color: white; background-color: #aaa }
    --></style>
    	</head>
    
    	<body bgcolor="black">
    		<table width="500" border="0" cellspacing="0" cellpadding="0">
    			<tr>
    				<td class="form" valign="top">
    					<table width="500" border="0" cellspacing="0" cellpadding="0">
    						<tr height="10">
    							<td width="198" height="10"></td>
    							<td width="25" height="10"></td>
    							<td width="140" height="10"></td>
    							<td height="10"></td>
    							<td width="10" height="10"></td>
    						</tr>
    						<tr height="40">
    							<td width="198" height="40">[img]pic/logo.jpg[/img]</td>
    							<td width="25" height="40"></td>
    							<td width="140" height="40"><span class="testodata">Pannel Gallery</span></td>
    							<td align="right" height="40"><span class="testodata">Pannel Clients</span></td>
    							<td align="right" width="10" height="40"></td>
    						</tr>
    					</table>
    				</td>
    			</tr>
    			<tr height="15">
    				<td valign="top" height="15"></td>
    			</tr>
    		</table>
    		<table width="500" border="0" cellspacing="0" cellpadding="0">
    			<tr>
    				<td>
    					<form id="ord" action=order.asp?tot=4&tab=Models method="post" name="ord">
    						
    						<table width="214" border="0" cellspacing="0" cellpadding="0">
    							<tr>
    								<td width="50"></td>
    								<td width="10"></td>
    								<td width="52"></td>
    								<td width="10"></td>
    								<td></td>
    							</tr>
    							<tr height="51">
    								<td align="center" width="50" height="51">[img]../img/kate1.jpg[/img]</td>
    								<td align="center" width="10" height="51"></td>
    								<td width="52" height="51"><input type="text" name=id1 value="3" readonly="readonly" size="5" /></td>
    								<td width="10" height="51"></td>
    								<td align="left" height="51"><select class="combo" name=form1 size="1">
    										<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option>
    									</select></td>
    							</tr>
    							<tr height="15">
    								<td width="50" height="15"></td>
    								<td width="10" height="15"></td>
    								<td width="52" height="15"></td>
    								<td width="10" height="15"></td>
    								<td height="15"></td>
    							</tr>
    						</table>
    						
    						<table width="214" border="0" cellspacing="0" cellpadding="0">
    							<tr>
    								<td width="50"></td>
    								<td width="10"></td>
    								<td width="52"></td>
    								<td width="10"></td>
    								<td></td>
    							</tr>
    							<tr height="51">
    								<td align="center" width="50" height="51">[img]../img/sarah.jpg[/img]</td>
    								<td align="center" width="10" height="51"></td>
    								<td width="52" height="51"><input type="text" name=id2 value="4" readonly="readonly" size="5" /></td>
    								<td width="10" height="51"></td>
    								<td align="left" height="51"><select class="combo" name=form2 size="1">
    										<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option>
    									</select></td>
    							</tr>
    							<tr height="15">
    								<td width="50" height="15"></td>
    								<td width="10" height="15"></td>
    								<td width="52" height="15"></td>
    								<td width="10" height="15"></td>
    								<td height="15"></td>
    							</tr>
    						</table>
    						
    						<table width="214" border="0" cellspacing="0" cellpadding="0">
    							<tr>
    								<td width="50"></td>
    								<td width="10"></td>
    								<td width="52"></td>
    								<td width="10"></td>
    								<td></td>
    							</tr>
    							<tr height="51">
    								<td align="center" width="50" height="51">[img]../img/untitled-1.jpg[/img]</td>
    								<td align="center" width="10" height="51"></td>
    								<td width="52" height="51"><input type="text" name=id3 value="5" readonly="readonly" size="5" /></td>
    								<td width="10" height="51"></td>
    								<td align="left" height="51"><select class="combo" name=form3 size="1">
    										<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option>
    									</select></td>
    							</tr>
    							<tr height="15">
    								<td width="50" height="15"></td>
    								<td width="10" height="15"></td>
    								<td width="52" height="15"></td>
    								<td width="10" height="15"></td>
    								<td height="15"></td>
    							</tr>
    						</table>
    						
    						<table width="214" border="0" cellspacing="0" cellpadding="0">
    							<tr>
    								<td width="50"></td>
    								<td width="10"></td>
    								<td width="52"></td>
    								<td width="10"></td>
    								<td></td>
    							</tr>
    							<tr height="51">
    								<td align="center" width="50" height="51">[img]../img/coco1.jpg[/img]</td>
    								<td align="center" width="10" height="51"></td>
    								<td width="52" height="51"><input type="text" name=id4 value="6" readonly="readonly" size="5" /></td>
    								<td width="10" height="51"></td>
    								<td align="left" height="51"><select class="combo" name=form4 size="1">
    										<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option>
    									</select></td>
    							</tr>
    							<tr height="15">
    								<td width="50" height="15"></td>
    								<td width="10" height="15"></td>
    								<td width="52" height="15"></td>
    								<td width="10" height="15"></td>
    								<td height="15"></td>
    							</tr>
    						</table>
    						
    
    						<input type="submit" name="Order" value="Order" />
    						<table width="198" border="0" cellspacing="0" cellpadding="0">
    							<tr>
    								<td align="right"></td>
    							</tr>
    						</table>
    					</form>
    				</td>
    			</tr>
    		</table>
    	</body>
    
    </html>


    adesso in questo esempio, il mio campo ha dei valori che vanno da 1 a 4, ma questi possono variare a seconda del suo caricamento(come un po tutto il resto).

    Chiedo ancora scusa per il malinteso...

  9. #9
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170


    mi date qualche consiglio???

  10. #10
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    170
    vi prego ragazzi datemi una mano per questa cosa....possibile che non ce una soluzione??

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.