Tuesday, 15 July 2014

javascript - Scan QR Code open Link p -



javascript - Scan QR Code open Link p -

instead of opening alert in next javascript code want redirect url url imported qr-code scan sadly no javascript. help?

<script type="text/javascript" charset="utf-8"> function scancode(){ cordova.plugins.barcodescanner.scan( function (result) { settimeout(function() {alert('very good. ' + result.text);}, 500); }, function (error) {alert("scanning failed: " + error); } ); } </script>

version redirection http redirect :

<script type="text/javascript" charset="utf-8"> function scancode(){ cordova.plugins.barcodescanner.scan( function (result) { settimeout(function() {windows.location.replace(result.text);}, 500); }, function (error) {alert("scanning failed: " + error); } ); } </script>

version redirection clicking on link :

<script type="text/javascript" charset="utf-8"> function scancode(){ cordova.plugins.barcodescanner.scan( function (result) { settimeout(function() {windows.location.href(result.text);}, 500); }, function (error) {alert("scanning failed: " + error); } ); } </script>

javascript redirect qr-code scanning

No comments:

Post a Comment