Guest User

Untitled

a guest
Jun 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. $('#payment').live('change',function()
  2. {
  3.  
  4. a = $('#pay_bycard');
  5. b = $('#pay_byaccount');
  6. //alert ( $(this).find('option:selected').val() );
  7. var state = $(this).find('option:selected').val();
  8.  
  9.  
  10. if ( state =='' )
  11. {
  12. $('#drawing').empty();
  13. $('#finalsubmit').empty();
  14. }
  15.  
  16.  
  17. if ( state =='card')
  18. {
  19.  
  20. $('#drawing').empty();
  21. //alert('test');
  22. //$('#drawing').empty().append(a.show());
  23. //$('#pay_bycard.').clone().show().appendTo('#drawing');
  24. //$('div.payform').eq(0).clone().show().appendTo('#drawing');
  25. $('#pay_bycard').clone(true).show().appendTo( '#drawing' );
  26. $('#pay_bycard').show();
  27. $('#finalsubmit').empty();
  28. }
  29.  
  30. if ( state =='account') {
  31. //$('#drawing').empty().append(b.show());
  32. $('#drawing').empty();
  33. b.clone().show().appendTo('#drawing');
  34.  
  35. $('#finalsubmit').empty();
  36.  
  37. // prepare the room method
  38. $.ajax({
  39. type : "POST",
  40. url : '/ajax/ajaxroom',
  41. data : 'a=a',
  42. async : false,
  43. success : function(msg){
  44.  
  45. if (msg=='fail') {
  46. $('#loginform').clone().show().appendTo('#drawing');
  47. } else {
  48.  
  49. $('#finalsubmit').empty();
  50. $('#allow').clone().show().appendTo('#finalsubmit');
  51. $('#meeting_room').empty().append(msg);
  52. $('#presswhat').empty().append('1');
  53. $('#dial_press').val('1');
  54. $('#dial_room').val(msg);
  55.  
  56.  
  57.  
  58.  
  59. }
  60. }
  61. });
  62.  
  63.  
  64. }
  65.  
  66. });
Add Comment
Please, Sign In to add comment