1
Gestione Form / Re:ChronoForm: calcolare il prezzo in base a 2 variabili, come?
« il: 18 Feb 2013, 15:05:56 »
salve a tutti sono nuovo del forum
io avrei un problema con la geometria variabile di questo futuro calcolatore di listini prezzi
vorrei che alla scelta di che tipo di movimento>motore
uscisse altri 2 campi alimentatore e telecomando
dopo svariati tentativi non ho concluso nulla
ringrazio anticipatamente per qualsiasi aiuto
questi sono i codici
form html
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Grandezza delle lamelle</label>
<select class="cf_inputbox validate-selection" id="select_2" size="1" title="Effettua una scelta!" name="lamelle" onChange="updatethis(this.form);">
<option value="">Clicca per scegliere</option>
<option value="89 mm">89 mm</option>
<option value="127 mm">127 mm</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Larghezza totale binario</label>
<input class="cf_inputbox validate-number" maxlength="150" size="30" title="" id="text_10" name="text_1" type="text" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Altezza totale</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="altezza" type="text" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Tipo di movimento</label>
<select class="cf_inputbox" id="select_8" size="1" title="" name="movimento">
<option value="">Choose Option</option>
<option value="Corda e catenella">Corda e catenella</option>
<option value="Motore">Motore</option>
</select>
<>
<div class="cfclear"> <>
<>
<div id="variabile" style="display: none;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Alimentatore 24ccv (corrente continua)</label>
<select class="cf_inputbox" id="select_11" size="1" title="" name="alimentatore">
<option value="">Choose Option</option>
<option value="si">si</option>
<option value="no">no</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Telecomando</label>
<select class="cf_inputbox" id="select_10" size="1" title="" name="telecomando">
<option value="">Choose Option</option>
<option value="no">no</option>
<option value="1 canale">1 canale</option>
<option value="2 canali">2 canali</option>
<option value="6 canali">6 canali</option>
</select>
<>
<div class="cfclear"> <>
<>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Tipo di raccolta</label>
<select class="cf_inputbox" id="select_9" size="1" title="" name="select_3">
<option value="">Choose Option</option>
<option value="raccolta destra">raccolta destra</option>
<option value="raccolta sinistra">raccolta sinistra</option>
<option value="altro">altro</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Gruppo prezzo </label>
<select class="cf_inputbox" id="select_7" size="1" title="" name="select_4">
<option value="">Choose Option</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>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Pesi</label>
<select class="cf_inputbox" id="select_13" size="1" title="" name="select_5">
<option value="">Choose Option</option>
<option value="con catenella">con catenella</option>
<option value="senza catenella">senza catenella</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Mensole per attacco</label>
<select class="cf_inputbox" id="select_16" size="1" title="" name="select_6">
<option value="">Choose Option</option>
<option value="nessuna">nessuna</option>
<option value="mensola da 7 cm">mensola da 7 cm</option>
<option value="mensola da 10 cm">mensola da 10 cm</option>
<option value="mensola da 13 cm">mensola da 13 cm</option>
</select>
<>
<div class="cfclear"> <>
<>
<>
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">Costi</h1>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 445px;">Prezzo totale</label>
<input class="cf_inputbox" maxlength="150" size="5" title="" id="text_14" name="prezzo_totale" type="text" readonly="readonly" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_3" type="invia ordine" />
<>
<div class="cfclear"> <>
<>
form javascript
function updatethis(form) {
var movimento=form.elements['movimento'].value;
switch (movimento) {
case "1":
break;
case "2":
break;
}
if (movimento=="2") {
document.getElementById("variabile").style.display = 'block';
} else {
document.getElementById("variabile").style.display = 'none';
form.elements['altezza'].value=0;
form.elements['telecomando'].value=0;
}
}
io avrei un problema con la geometria variabile di questo futuro calcolatore di listini prezzi
vorrei che alla scelta di che tipo di movimento>motore
uscisse altri 2 campi alimentatore e telecomando
dopo svariati tentativi non ho concluso nulla
ringrazio anticipatamente per qualsiasi aiuto
questi sono i codici
form html
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Grandezza delle lamelle</label>
<select class="cf_inputbox validate-selection" id="select_2" size="1" title="Effettua una scelta!" name="lamelle" onChange="updatethis(this.form);">
<option value="">Clicca per scegliere</option>
<option value="89 mm">89 mm</option>
<option value="127 mm">127 mm</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Larghezza totale binario</label>
<input class="cf_inputbox validate-number" maxlength="150" size="30" title="" id="text_10" name="text_1" type="text" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Altezza totale</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="altezza" type="text" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Tipo di movimento</label>
<select class="cf_inputbox" id="select_8" size="1" title="" name="movimento">
<option value="">Choose Option</option>
<option value="Corda e catenella">Corda e catenella</option>
<option value="Motore">Motore</option>
</select>
<>
<div class="cfclear"> <>
<>
<div id="variabile" style="display: none;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Alimentatore 24ccv (corrente continua)</label>
<select class="cf_inputbox" id="select_11" size="1" title="" name="alimentatore">
<option value="">Choose Option</option>
<option value="si">si</option>
<option value="no">no</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Telecomando</label>
<select class="cf_inputbox" id="select_10" size="1" title="" name="telecomando">
<option value="">Choose Option</option>
<option value="no">no</option>
<option value="1 canale">1 canale</option>
<option value="2 canali">2 canali</option>
<option value="6 canali">6 canali</option>
</select>
<>
<div class="cfclear"> <>
<>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Tipo di raccolta</label>
<select class="cf_inputbox" id="select_9" size="1" title="" name="select_3">
<option value="">Choose Option</option>
<option value="raccolta destra">raccolta destra</option>
<option value="raccolta sinistra">raccolta sinistra</option>
<option value="altro">altro</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Gruppo prezzo </label>
<select class="cf_inputbox" id="select_7" size="1" title="" name="select_4">
<option value="">Choose Option</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>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Pesi</label>
<select class="cf_inputbox" id="select_13" size="1" title="" name="select_5">
<option value="">Choose Option</option>
<option value="con catenella">con catenella</option>
<option value="senza catenella">senza catenella</option>
</select>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Mensole per attacco</label>
<select class="cf_inputbox" id="select_16" size="1" title="" name="select_6">
<option value="">Choose Option</option>
<option value="nessuna">nessuna</option>
<option value="mensola da 7 cm">mensola da 7 cm</option>
<option value="mensola da 10 cm">mensola da 10 cm</option>
<option value="mensola da 13 cm">mensola da 13 cm</option>
</select>
<>
<div class="cfclear"> <>
<>
<>
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">Costi</h1>
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 445px;">Prezzo totale</label>
<input class="cf_inputbox" maxlength="150" size="5" title="" id="text_14" name="prezzo_totale" type="text" readonly="readonly" />
<>
<div class="cfclear"> <>
<>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_3" type="invia ordine" />
<>
<div class="cfclear"> <>
<>
form javascript
function updatethis(form) {
var movimento=form.elements['movimento'].value;
switch (movimento) {
case "1":
break;
case "2":
break;
}
if (movimento=="2") {
document.getElementById("variabile").style.display = 'block';
} else {
document.getElementById("variabile").style.display = 'none';
form.elements['altezza'].value=0;
form.elements['telecomando'].value=0;
}
}