Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 1.06 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. paypal doesnt go through ask shipping statement if lower then 30
  2. function askShipping(){
  3.     var amount = $("#amount").val();
  4.     if(amount == ''){
  5.         alert('Please enter Donation amount');
  6.         return false;
  7.     }
  8.     if(amount >= 30){
  9.         var ret = shipSuccess();
  10.         return false;
  11.     }
  12.     return false;
  13. }
  14. function shipSuccess(){
  15.     $( "#dialog:ui-dialog" ).dialog( "destroy" );
  16.  
  17.     $( "#dialog-success" ).dialog({
  18.         height: 260,
  19.         modal: true,
  20.         buttons: {
  21.             "yes": function(){
  22.                 $( this ).dialog( "close" );
  23.                 shippingForm();
  24.                 // document.donationForm.submit();
  25.             },
  26.             Cancel: function() {
  27.                 $( this ).dialog( "close" );
  28.                 document.donationForm.submit();
  29.  
  30.             }
  31.         }
  32.     });
  33. }
  34.        
  35. function askShipping () {
  36.     if ($("#amount").val() == '') {
  37.         alert('Please enter Donation amount');
  38.     } else if (amount >= 30) {
  39.         shipSuccess();
  40.     } else {
  41.         document.donationForm.submit();
  42.     }
  43.     return false;
  44. }