E' vero col codice postato da te funziona ma col mio no purtroppo![]()
Te lo posto tutto, premettendo che si tratta di 2 selettori uno per il prezzo minimo e uno per il prezzo massimo di un prodotto. Lo scopo è che il selettore 2 non vada al di sotto del prezzo impostato sul primo.
Il Javascript che si richiama è disponibile qui mentre un esempio di dove lo vorrei applicarlo lo trovi qui in Ricerca avanzata
Grazie tante!codice:<FORM name="demoForm" action="/portatili/cerca.asp" method="get" onSubmit="return mess();" target="_parent"> <table width="100%"> <tr> <td class="space_table"> <script language="JavaScript" src="slider.js"></script> <span class="formsmall">Costo minimo </span></td> <td width="55" rowspan="2" valign="bottom"> <span class="scrollnews">€.</span> <input name="sliderValue1" type="Text" class="form_blue" id="sliderValue1" size="4" onChange="A_INIT2[n_minValue]=300;" /> </td> </tr> <tr> <td> <script language="JavaScript"> var A_TPL = { 'b_vertical' : false, 'b_watch': true, 'n_controlWidth': 100, 'n_controlHeight': 13, 'n_sliderWidth': 13, 'n_sliderHeight': 12, 'n_pathLeft' : 1, 'n_pathTop' : 1, 'n_pathLength' : 86, 's_imgControl': 'blueh_bg.gif', 's_imgSlider': 'blueh_sl.gif', 'n_zIndex': 1 } var A_INIT1 = { 's_form' : 0, 's_name': 'sliderValue1', 'n_minValue' : 0, 'n_maxValue' : 3000, 'n_value' : 200, 'n_step' : 20 } new slider(A_INIT1, A_TPL); </script> </td> </tr> <tr> <td class="formsmall"> Costo massimo </span></td> <td width="55" rowspan="2" valign="bottom"> <span class="scrollnews">€.</span> <input name="sliderValue2" type="Text" class="form_red" id="sliderValue2" size="4" /> </td> </tr> <tr> <td height="10"> <script language="JavaScript"> var A_TPL = { 'b_vertical' : false, 'b_watch': true, 'n_controlWidth': 100, 'n_controlHeight': 13, 'n_sliderWidth': 13, 'n_sliderHeight': 12, 'n_pathLeft' : 1, 'n_pathTop' : 1, 'n_pathLength' : 86, 's_imgControl': 'red_bg.gif', 's_imgSlider': 'red_sl.gif', 'n_zIndex': 1 } //aggiunta variabile var prezzomin=document.getElementById('sliderValue1').value; alert (prezzomin); // fine var A_INIT2 = { 's_form' : 0, 's_name': 'sliderValue2', 'n_minValue' : parseInt(prezzomin), 'n_maxValue' : 3000, 'n_value' : 3000, 'n_step' : 20 } new slider(A_INIT2, A_TPL); </script> </td> </tr> </table > <input name="submit" type="submit" class="form1" value="cerca portatile"> <input name="page" type="hidden" value="1"> </form>

Rispondi quotando