Ripple //Send URL Generator
generate a ripple // Send URL generate a QR-code with that URL
by bizamajig
HTML
<script src="http://jeromeetienne.github.io/jquery-qrcode/src/jquery.qrcode.js"></script>
<script src="http://jeromeetienne.github.io/jquery-qrcode/src/qrcode.js"></script>
<p><a href="https://ripple.com/wiki/Ripple_URIs#send">https://ripple.com/wiki/Ripple_URIs#send</a>
</p><a href="https://github.com/lrsjng/jQuery.qrcode"> jQuery.qrcode</a>
<br>
<br>QR-code with a //send adress
<br>scan and purchase
<br>an ecosystem of things
<br>applications are infinite
<br>
<br>
<br>
<form id="urlBuilder" name="urlBuilder" method="post" action="">
<p>
<label>Recipient
<input type="text" name="to" id="recipient" />(ripple adress)</label>
</p>
<p>
<label>Destination
<input type="text" name="dt" id="amount" />(<a href="https://ripple.com/wiki/Require_a_destination_tag_for_inbound_payments">see ripple wiki</a>)</label>
</p>
<p>
<label>Amount
<input type="text" name="amount" id="amount" />(amount)</label>
</p>
<p>
<label>Currency
<input type="text" name="currency" id="currency" />(ex. USD)</label>
</p>
<p>
<label>URL
<input type="text" name="url" id="url" />
</label>
</p>
<p>
<input type="button" name="button" id="button" value="Generate QR-code" />
</p>
</form>
<div id="qrcodeholder"></div>
JavaScript
//generate //send url
var partFields = $('#urlBuilder').find('input[type=text]').not('#url').not('#currency');
$('#urlBuilder').change(function () {
var url = 'https://ripple.com//send?';
var valuta = '/' + $('#currency').val();
var urlValue = url + partFields.serialize() + valuta;
$('#url').val(urlValue); // set the hidden input value
});
//click Button call jquery.qrcode
$('#button').click(function () {
//clear #qrcodeholder
$('#qrcodeholder').empty();
//qrcode
$('#qrcodeholder').qrcode({
text: $('#url').val(),
render: "canvas", // 'canvas' or 'table'. Default value is 'canvas'
background: "#ffffff",
foreground: "#000000",
width: 150,
height: 150
});
//end qrcode
});