<!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" /> <link type="text/css" href="http://code.jquery.com/ui/1.10.2/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <script type="text/javascript"> $(function() { $( "#slider_czas" ).slider({ value: 30, min: 1, max: 59, step: 1, slide: function( event, ui ) { $( "#slider_czas_liczba" ).val( ui.value ); $( "#slider_czas_pokaz" ).val( ui.value + " x + " + ui.value/2 + " y" ); } }); $( "#slider_czas_liczba" ).val( $( "#slider_czas" ).slider( "value" ) ); $( "#slider_czas_pokaz" ).val( $( "#slider_czas" ).slider( "value" ) + " x + " + $( "#slider_czas" ).slider( "value" )/2 + " y" ); }); </script> </head> <body> <?php ?> <form action="/test.php" method="post"> INPUT A: <br/> <input type="text" id="slider_czas_pokaz" style="font-weight:bold; width:200px;" disabled/> <br/> <br/> INPUT B: <br/> <input type="text" name="input_b" id="slider_czas_liczba" style="font-weight:bold;" disabled/> <br/> <br/> INPUT C (testowy): <br/> <input type="text" name="input_c" style="font-weight:bold;" /> <br/> <br/> Suwak: <br/> <div id="slider_czas" style="width:450px;display:inline-block;"></div> <br/> <br/> Wyślij formularz i zwróć wartość INPUTA B i INPUTA C: <input type="submit" value="Wyślij" /> </form> </body> </html>
Opis:
INPUT A (disabled) - ma za zadanie wyświetlać przerobioną wartość ustawioną na Suwaku
INPUT B (disabled) - ma za zadanie zostać wysłanym w formularzu
INPUT C (enabled) - testowy, również wysyłany w formularzu
Problem polega na tym, że formularz nie zwraca mi wartości z INPUT B, wie ktoś z Was jak tego dokonać?
Pozdrawiam.