![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello everyone, I have a small problem with javascript below: p>Slider Test</p div class="slider" id="slider1" tabIndex="1" input class="slider-input" id="slider1_input"/ /div form id="slider1_form" method="get" action="/protect/control.htm" Value:<input type="text" name="slider1_output" id="slider1_disp" value="5"/ /form script type="text/javascript" var sdr1 = new Slider(document.getElementById("slider1"), document.getElementById("slider1_input")); |
|
sdr1.onchange = function () { document.getElementById("slider1_disp").value = sdr1.getValue(); document.getElementById("slider1_form").submit(); }; /script I got the slider's onchange function to trigger the form GET function, and the web server can get the slider value properly. However, after that, the value of the input text box (id="slider1_disp") returns to 5 (or whatever default value I put at the input text box). How do I prevent the value of the input text box to return to the default value (i.e. I want to keep the last value that is submitted). Any suggestion is welcome. Thank you in advance! |
![]() |
| Thread Tools | |
| Display Modes | |
| |