Guest User

Untitled

a guest
Oct 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. //AJAX CALL FOR CATEGORY(FIRST DROPDOWN)
  2. $(document).ready(function(){
  3. $('#select2').on('change',function(){
  4. $('#loading1').css("display","block")
  5. var catgoryId = $(this).val();
  6. if(catgoryId){
  7. $.ajax({
  8. type:'POST',
  9. url:'ajax_load_subcategory.php',
  10. data:{catgoryId:catgoryId},
  11. success:function(html){
  12. $('#select4').html(html);
  13. $('#loading1').css("display","none")
  14. }
  15. });
  16. }else{
  17. $('#select4').html('<option value="">Select Category first</option>');
  18. }
  19. });
  20. });
  21. //CALL FOR SECOND DROPDOWN
  22. $(document).ready(function(){
  23. $('#select4').on('change',function(){
  24. var subcatgoryId = $(this).val();
  25. alert(subcatgoryId);
  26. //HOW CAN I FILL THIRD DROPDOWN VALUES
  27. // BASED UPON SECOND DROPDOWN VALUES
  28. });
  29. });
Add Comment
Please, Sign In to add comment