Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" charset="utf-8">
- function generujToolName() {
- $.getJSON('changeToolName.php', {id:$('#inspectionNumber').val()}, function(data) {
- var toAppend = "";
- for(var i = 0; i < data.length; i++){
- toAppend += '<option value = \"' + data[i].id + '\">' + data[i].tool + '</option>';
- }
- $("#toolName").empty();
- $("#toolName").html(toAppend);
- }, "json");
- }
- function generujParameter() {
- $.getJSON('changeParameter.php', {ino:$('#inspectionNumber').val(), id:$('#toolName').val(), text:$('#toolName').text()}, function(data) {
- var toAppend = "";
- for(var i = 0; i < data.length; i++){
- toAppend += '<option value = \"' + data[i].id + '\">' + data[i].tool + '</option>';
- }
- $("#parameter").empty();
- $("#parameter").html(toAppend);
- }, "json");
- }
- $(document).ready(function() {
- $('#inspectionNumber').change(function() {
- generujToolName();
- });
- $('#toolName').change(function() {
- generujParameter();
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement