Ich hoffe mir kann da jemand weiterhelfen , I check des Java Script net
Ich hab einen Drehknopf um Werte zu verändern mit einem Eingabefeld wo Ich den Wert auch händisch Eingeben kann https://www.jqwidgets.com/jquery-wid...ed.htm?search=
Ich möchte die Werte an eine PHP Datei senden das funktioniert auch Grundsätzlich aber nur wenn Ich einmal einen Wert in das Feld geschrieben habe. Wenn Ich nichts reinschreibe kann Ich am Rad drehen was Ich will es kommt nicht an in der PHP Datei. mit dem Rot markierten schreib Ich den Wert in eine Datei. Das gehört wahrscheinlich an eine andere Stelle und wird einmal genügen nehme Ich an. Ahja wenn ma schon dabei sind: Wie kann Ich den Wert von einer PHP Datei reinschreiben damit sich der Knopf bewegt?
<script type="text/javascript"> $(document).ready(function () { $('#container').jqxKnob({ value: 50, min: 0, max: 100, startAngle: 120, endAngle: 420, snapToStep: true, rotation: 'clockwise', style: { stroke: '#dfe3e9', strokeWidth: 3, fill: { color: '#fefefe', gradientType: "linear", gradientStops: [[0, 1], [50, 0.9], [100, 1]] } }, marks: { colorRemaining: { color: 'grey', border: 'grey' }, colorProgress: { color: '#00a4e1', border: '#00a4e1' }, type: 'line', offset: '71%', thickness: 3, size: '6%', majorSize: '9%', majorInterval: 10, minorInterval: 2 }, labels: { offset: '88%', step: 10, visible: true }, progressBar: { style: { fill: '#00a4e1', stroke: 'grey' }, size: '9%', offset: '60%', background: { fill: 'grey', stroke: 'grey' } }, pointer: { type: 'arrow', style: { fill: '#00a4e1', stroke: 'grey' }, size: '59%', offset: '49%', thickness: 20 } }); input = $('<div class="inputField">'); $('#container').append(input); var inputOptions = { width: 180, height: '40px', decimal: 10, min: 0, max: 100, textAlign: 'center', decimalDigits: 1, inputMode: 'simple' }; $(input).jqxNumberInput(inputOptions); $(input).on('mousedown', function (event) { event.stopPropagation(); }); //Drehrad $(input).jqxNumberInput(inputOptions); $(input).on('change', function () { var val = $(this).val(); [COLOR=#FF0000]xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","index6.php?q="+val,true); xmlhttp.send();[/COLOR] $('#container').val(val); }); //Eingabefeld $(input).jqxNumberInput(inputOptions); $(input).on('keyup', function () { var val = $(this).val(); [COLOR=#FF0000] xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","index6.php?q="+val,true); xmlhttp.send();[/COLOR] $('#container').val(val); }); $('#container').on('change', function (event) { if (event.args.changeSource == 'propertyChange' || event.args.changeSource == 'val') { return; } $(input).val(event.args.value); }) }); </script>
Kommentar