Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <br /><br />
- <div class="container">
- <h3>
- <select name="brand" id="brand">
- <option value="">Show All Product</option>
- <?php echo fill_brand($connect); ?>
- </select>
- <select name="goal" id="goal">
- <option value="">Show All Product</option>
- <option value="test">test</option>
- </select>
- <br /><br />
- <div class="row" id="show_product">
- <?php echo fill_product($connect);?>
- </div>
- </h3>
- </div>
- </body>
- </html>
- <script>
- $(document).ready(function(){
- $('#brand').change(function(){
- var brand_id = $(this).val();
- $.ajax({
- url:"load_data.php",
- method:"POST",
- data:{brand_id:brand_id},
- success:function(data){
- $('#show_product').html(data);
- }
- });
- });
- $('#test').change(function(){
- var goal_id = $(this).val();
- $.ajax({
- url:"load_data.php",
- method:"POST",
- data:{test_id:test_id},
- success:function(data){
- $('#show_product').html(data);
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement