jamesmva

Untitled

Oct 7th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.97 KB | None | 0 0
  1. $(document).ready(function(e){
  2.   e.preventDefault();
  3.     $('.fabric').on('change',function(e){
  4.         var fabricID = $(this).val();
  5.         console.log("fabric id_price is " + fabricID); //debugging
  6.         if(fabricID){
  7.            $.ajax({
  8.                 type:'GET',
  9.                 url:'calculates.php',
  10.                 data:'id_price='+fabricID,
  11.                 success:function(html){                                                          
  12.                   // do nothing cuz i just need to combine with script bellow
  13.                //some closing tags
  14.     $('.size').on('change',function(e){
  15.       e.preventDefault();
  16.         var sizeID = $(this).val();
  17.         if(sizeID){
  18.             $.ajax({
  19.                 type:'GET',
  20.                 url:'calculates.php',
  21.                 dataType: 'json',
  22.                 data:'size_id='+sizeID,
  23.                 success:function(html){
  24.                   $(".icms" + id).text(data.val);
  25.               //some closing tags
Advertisement
Add Comment
Please, Sign In to add comment