ByteScout Cloud API Server - Barcode Generator API - JavaScript - Generate Barcode (JQuery) - Async API - ByteScout

ByteScout Cloud API Server – Barcode Generator API – JavaScript – Generate Barcode (JQuery) – Async API

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – Barcode Generator API – JavaScript – Generate Barcode (JQuery) – Async API

How to generate barcode (jquery) async API for barcode generator API in JavaScript with ByteScout Cloud API Server

Step-by-step tutorial:How to generate barcode (jquery) async API to have barcode generator API in JavaScript

We regularly create and update our sample code library so you may quickly learn barcode generator API and the step-by-step process in JavaScript. ByteScout Cloud API Server was designed to assist barcode generator API in JavaScript. ByteScout Cloud API Server is the ready to deploy Web API Server that can be deployed in less than thirty minutes into your own in-house Windows server (no Internet connnection is required to process data!) or into private cloud server. Can store data on in-house local server based storage or in Amazon AWS S3 bucket. Processing data solely on the server using built-in ByteScout powered engine, no cloud services are used to process your data!.

The SDK samples displayed below below explain how to quickly make your application do barcode generator API in JavaScript with the help of ByteScout Cloud API Server. This sample code in JavaScript is all you need. Just copy-paste it to the code editor, then add a reference to ByteScout Cloud API Server and you are ready to try it! Want to see how it works with your data then code testing will allow the function to be tested and work properly.

ByteScout Cloud API Server – free trial version is available on our website. Also, there are other code samples to help you with your JavaScript application included into trial version.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

generate_barcode.js
      
// Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". // If it's not then please replace this with with your hosting url. $(document).ready(function () { $("#resultBlock").hide(); $("#errorBlock").hide(); }); $(document).on("click", "#submit", function () { var url = "https://localhost/barcode/generate?name=barcode.png"; url += "&type=" + $("#barcodeType").val(); // Set barcode type (symbology) url += "&value=" + $("#inputValue").val(); // Set barcode value url += "&async=True"; // Set async // Show loader $("#loader").show(); $.ajax({ url: url, type: "GET" }) .done(function (data, textStatus, jqXHR) { if (data.error) { $("#errorBlock").show(); $("#error").html(data.message); $("#loader").hide(); } else { checkIfJobIsCompleted(data.jobId, data.url); } }) .fail(function (jqXHR, textStatus, errorThrown) { $("#errorBlock").show(); $("#error").html("Request failed. Please check you use the correct API key."); $("#loader").hide(); }); }); function checkIfJobIsCompleted(jobId, resultFileUrl) { $.ajax({ url: 'https://localhost/job/check?jobid=' + jobId, type: 'GET', success: function (jobResult) { $("#status").html(jobResult.status + ' &nbsp;&nbsp;&nbsp; <img src="ajax-loader.gif" />'); if (jobResult.status == "working") { // Check again after 3 seconds setTimeout(function(){ checkIfJobIsCompleted(jobId, resultFileUrl); }, 3000); } else if (jobResult.status == "success") { $("#resultBlock").show(); $("#image").attr("src", resultFileUrl); } $("#loader").hide(); }, error: function(){ $("#errorBlock").show(); $("#error").html("Request failed. Please check you use the correct API key."); $("#loader").hide(); } }); }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next