You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys, Iam having a challenge of completing auto filling of dependant input textfields on a form through ID Search. Any Help is Highly Welcome. These are the details for the Form, Php File and Jquery/Ajax File:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Guys, Iam having a challenge of completing auto filling of dependant input textfields on a form through ID Search. Any Help is Highly Welcome. These are the details for the Form, Php File and Jquery/Ajax File:
HTML FILE:
PHP FILE
0) { while($row = mysqli_fetch_assoc($resultSet)) { $data = $row; } } echo json_encode($data); } ?>JAVASCRIPT/AJAX FILE
<script> $(document).ready(function(){ $('#searchdata').click(function(e){ e.preventDefault(); var id = $("input[name=id]").val(); $.ajax({ type: "POST", url: 'getStage.php', data: { "search_post_btn": 1, "id": id, }, dataType: "text", success: function(result){ var jsondata = $.parseJSON(result); $("input[name='stagename']").val(jsondata[id].stagename); $("input[name='id']").val(jsondata[id].id); $("input[name='stgcreation_date']").val(jsondata[id].stgcreation_date); $("input[name='stagelocation']").val(jsondata[id].stagelocation); $("input[name='stagechairperson']").val(jsondata[id].stagechairperson); $("input[name='stagechairpersonNIN']").val(jsondata[id].stagechairpersonNIN); $("input[name='stagechairpersoncontact']").val(jsondata[id].stagechairpersoncontact); $("input[name='stagevillage']").val(jsondata[id].stagevillage); $("input[name='stageparish']").val(jsondata[id].stageparish); $("input[name='stagedistrict']").val(jsondata[id].stagedistrict); } }); }); }); </script>Beta Was this translation helpful? Give feedback.
All reactions