javascript - What is the best way to do this..? -


i making android app using cordova. have cordova barcode scanner plugin on app meant scanning ids. once id scanned , result given need on url (https://example.org/people/home.html?id=123456789). problem have, website doesn't have "?id=1233456789" have query (?frn=). cannot attempt place result id in url, frn , ids stored in sql db together. app, don't think can place db , query id , plug id in url.

so question is: smartest/best way find frn using result given result/id? again, don't want connect db app, want use webservice or something.

what script tag contains if helps:

<script>         function scan() {             cordova.plugins.barcodescanner.scan(                 function (result) {                     console.log(result.text)                     var barcode_res = (" id\n" +                          "result: " + result.text);                     window.alert("id result: " + result.text);                       //window.open('http://example.org/students/home.html?frn=' + result.text);                  },                 function (error) {                     window.alert("scanning failed: " + error);                 },              );          }     </script> 


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -