Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2003
    Messaggi
    14

    calcolo con risultato dinamico

    Ciao ragazzi, e grazie anticipatamente!!!!

    sto cercando di fare un menu un po dinamico e mi chiedevo se fosse possibile farlo con jsp.
    Vi spiego io ho un prodotto che ha un valore definito , vorrei che in base alla selezione quantitativa il totale del costo si aggiorni in automatico,

    vi incollo di seguito il codice così e piu chiaro il tutto poi dovrebbe essere spedito via mail con encript/text

    grazie per la vostra pazienza !!!

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="stile.css" rel="stylesheet" type="text/css">
    </head>

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="testoform">
    <tr>
    <td width="5" bgcolor="#FFFFFF"></td>
    <td width="279"><font color="#000000">Tipo di panino</font></td>
    <td width="169"><font color="#000000">Quantit&agrave;</font></td>
    <td width="163"><font color="#000000">Costo Qt. 1 </font></td>
    <td width="163"><font color="#000000">Totale</font></td>
    <td width="5" bgcolor="#FFFFFF"></td>
    </tr>
    <tr>
    <td width="5" bgcolor="#FFFFFF"></td>
    <td></td>
    <td width="169"></td>
    <td width="163"></td>
    <td width="163"></td>
    <td width="5" bgcolor="#FFFFFF"></td>
    </tr>
    <tr>
    <td width="5" height="5" bgcolor="#FFFFFF"></td>
    <td height="5" bgcolor="#CCCCCC"><font color="#000000">PRAGA</font></td>
    <td width="169" height="5" bgcolor="#CCCCCC"></td>
    <td width="163" height="5" bgcolor="#CCCCCC"></td>
    <td width="163" height="5" bgcolor="#CCCCCC"></td>
    <td width="5" height="5" bgcolor="#FFFFFF"></td>
    </tr>
    <tr valign="bottom">
    <td width="5" bgcolor="#FFFFFF"></td>
    <td>Carciofino</td>
    <td width="169"> <select name="qt" size="1" id="qt">
    <option value="&euro;3,40">Qt. 1</option>
    <option value="&euro;6,80">Qt. 2</option>
    <option value="&euro;10,20">Qt. 3</option>
    <option value="&euro;12,80">Qt. 4</option>
    <option value="&euro;17">Qt. 5</option>
    <option value="&euro;20,40">Qt. 6</option>
    <option value="&euro;23,80">Qt. 7</option>
    <option value="&euro;27,20">Qt. 8</option>
    <option value="&euro;30,60">Qt. 9</option>
    <option value="&euro;34">Qt. 10</option>
    </select></td>
    <td width="163">&euro;3,40</td>
    <td width="163"></td>
    <td width="5" bgcolor="#FFFFFF"></td>
    </tr>
    <tr>
    <td width="5" bgcolor="#FFFFFF"></td>
    <td><font size="1">praga, brie, carciofini, origano</font></td>
    <td width="169"></td>
    <td width="163"></td>
    <td width="163"></td>
    <td width="5" bgcolor="#FFFFFF"></td>
    </tr>
    <tr>
    <td width="5" height="5" bgcolor="#FFFFFF"></td>
    <td height="5" bgcolor="#CCCCCC"></td>
    <td width="169" height="5" bgcolor="#CCCCCC"></td>
    <td width="163" height="5" bgcolor="#CCCCCC"></td>
    <td width="163" height="5" bgcolor="#CCCCCC"></td>
    <td width="5" height="5" bgcolor="#FFFFFF"></td>
    </tr>
    </table>
    </body>
    </html>

  2. #2
    Utente di HTML.it L'avatar di Sgnafurz
    Registrato dal
    Mar 2003
    Messaggi
    2,182
    puoi farlo in javascript
    nella funzione onChange del SELECT chiama una funzione js che recupera il value dell'option selezionato e lo somma al valore attuale della somma

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 © 2025 vBulletin Solutions, Inc. All rights reserved.