Template:DonateForm

From Combine OverWiki, the original Half-Life wiki and Portal wiki
Jump to: navigation, search

<html> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="combineoverwiki@gmail.com" /> <input type="hidden" name="item_name" value="Donation to Combine OverWiki" /> <input type="hidden" name="currency_code" value="USD" /> <input type="hidden" name="return" value="http://combineoverwiki.net/wiki/OverWiki:Donate/Thanks" /> <input type="hidden" name="custom" value="" />

Select your gift amount:

<label><input type="radio" name="amount" value="5.00" />$5</label>

<label><input type="radio" name="amount" value="10.00" />$10</label>

<label><input type="radio" name="amount" value="15.00" />$15</label>

<label><input type="radio" name="amount" value="20.00" />$20</label>

<label><input type="radio" name="amount" value="25.00" />$25</label>

<label><input type="radio" name="amount" value="50.00" />$50</label>

<label><input type="radio" name="amount" value="" id="wmh_obutton" />Other: $</label> <input size="2" name="customAmount" onfocus="this.form.wmh_obutton.checked=true;" onchange="this.form.wmh_obutton.value = this.form.wmh_otext.value" id="wmh_otext" />


<input type="submit" class="input-button2 button-red" value="Donate via PayPal" style="display: block; margin: 0 auto; float: right;" onclick="submitdonation();" /> </form>


Your personal information will not be shared.

<script type="text/javascript"> var wmh_paypal = document.getElementById('wmh_paypal'); var wmh_obutton = document.getElementById('wmh_obutton'); var wmh_otext = document.getElementById('wmh_otext');

function copyAmount() { wmh_obutton.value = wmh_otext.value; } addOnloadHook(function() { copyAmount(); addHandler(wmh_otext, 'change', copyAmount); addHandler(wmh_otext, 'blur', copyAmount); addHandler(wmh_otext, 'focus', function() { wmh_obutton.checked = true; }); }); }); </script>

<script type="text/javascript">

function submitdonation() { var check_email = document.getElementById('input_email'); wmh_paypal.custom.value = getQuerystring( 'utm_medium' ) + '.' + getQuerystring( 'utm_campaign' ) + '.' + getQuerystring( 'utm_source' ) + '.' + getLandingPage(); + '.' + check_email.value;

}

function getQuerystring( key ) {

 key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' );
 var regex = new RegExp( '[\\?&]' + key + '=([a-zA-Z0-9\_\-]*)' );
 var qs = regex.exec( window.location.search );
 return qs == null ?  : qs[1];

}

function getLandingPage() {

  var path = "JA1";
  if( path == "default"){
     pathArray = window.location.pathname.split( '/' );
     return pathArray[2];
  }
  else return path;

}

document.paypalcontribution.utm_medium.value = getQuerystring( 'utm_source' ); document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ); document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_medium' ); document.paypalcontribution.referrer.value = document.referrer; </script> </html>