Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <body>
  2. <br /><br />
  3. <div class="container">
  4. <h3>
  5. <select name="brand" id="brand">
  6. <option value="">Show All Product</option>
  7. <?php echo fill_brand($connect); ?>
  8. </select>
  9. <select name="goal" id="goal">
  10. <option value="">Show All Product</option>
  11. <option value="test">test</option>
  12. </select>
  13. <br /><br />
  14. <div class="row" id="show_product">
  15. <?php echo fill_product($connect);?>
  16. </div>
  17. </h3>
  18. </div>
  19. </body>
  20. </html>
  21. <script>
  22. $(document).ready(function(){
  23. $('#brand').change(function(){
  24. var brand_id = $(this).val();
  25. $.ajax({
  26. url:"load_data.php",
  27. method:"POST",
  28. data:{brand_id:brand_id},
  29. success:function(data){
  30. $('#show_product').html(data);
  31. }
  32. });
  33. });
  34. $('#test').change(function(){
  35. var goal_id = $(this).val();
  36. $.ajax({
  37. url:"load_data.php",
  38. method:"POST",
  39. data:{test_id:test_id},
  40. success:function(data){
  41. $('#show_product').html(data);
  42. }
  43. });
  44. });
  45. });
  46. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement