<link rel="stylesheet" href="<?php echo DOMAIN ?>/jquery_file_upload/css/style.css">
<link rel="stylesheet" href="<?php echo DOMAIN ?>/jquery_file_upload/css/jquery.fileupload.css">
<input type="hidden" class="file_url" value="<?php echo DOMAIN ?>/ajax/upload_brand_image" />

                            

<div class="error-main"></div>
                            <div class="form-group input-container">
                                <label for="Name" class=" form-control-label">Category</label>
                                <select class="form-control" name="cat_id" id="category">
                                    <option value="">---- Select Category ----</option>
                                    <?php
                                    foreach ($cat as $c)
                                    {
                                    ?>
                                    <option value="<?php echo $c['cl_id'];?>"><?php echo $c['cl_name'];?></option>
                                    <?php
                                    }
                                    ?>
                                </select>
                               
                                <div class="error-input"></div>
                            </div>
                            <div class="form-group input-container">
                                <label for="Description" class=" form-control-label">Subcategory</label>
                                <select class="form-control" name="subcat_id" id="subcategory">
                                    <option value="">---- Select Subcategory ----</option>
                                </select>
                                <div class="error-input"></div>
                            </div>

                             <div class="form-group input-container">
                                <label for="Description" class=" form-control-label">Product</label>
                                <select class="form-control" name="product_id" id="product">
                                    <option></option>
                                </select>
                                <div class="error-input"></div>
                            </div>
                            
							<div class="form-group">
							<button type="submit" class="track-btn pull-right btn-submit">Submit</button>
							
							</div>


                                                        <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="<?php echo DOMAIN ?>/jquery_file_upload/js/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="<?php echo DOMAIN ?>/jquery_file_upload/js/jquery.fileupload.js"></script>
                            
 <script>
     jQuery(document).ready(function(){
     
    jQuery('#category').change(function(e){
        e.preventDefault();
        var html="";
        var id =$(this).val();
        $.get('../ajax/product_subcategory/get?id='+id,function(res){
            $(res).each(function(i,value){
                
                html+='<option value="' + value.cl_id +'">'+value.cl_name+'</option>';
            });
          $('#subcategory').html(html);  
        },'json');
    });
    
    jQuery('#subcategory').change(function(e){
        e.preventDefault();
        var html="";
        var id =$(this).val();
        $.get('../ajax/products/get?id='+id,function(res){
            $(res).each(function(i,value){
                
                html+='<option value="' + value.cl_id +'">'+value.cl_name+'</option>';
            });
          $('#product').html(html);  
        },'json');
    });
     });
 </script>                          