Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <script type="text/javascript">
  5.     $(document).ready(function(){
  6.         $(".pname").change(function(){
  7.             var id=$(this).val();
  8.             var dataString = 'id='+ id;
  9.             $.ajax
  10.             ({
  11.                 type: "POST",
  12.                 url: "get_price.php",
  13.                 data: dataString,
  14.                 cache: false,
  15.                 success: function(html)
  16.                     {
  17.                         $(".price").val(html);
  18.                     }
  19.             });
  20.         });
  21.     });
  22. </script>
  23.  
  24. </head>
  25.  
  26. <body>
  27.  
  28. <form name="pro[]" method="post">
  29. <select name="f1">
  30.     <option>1</option>
  31.     <option>2</option>
  32.     <option>3</option>
  33. </select>
  34.  
  35. <input name="pro2[]" />
  36. </form>
  37. </body>
  38. <html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement