Error message on TSC Printer: ActiveXObject is not defined in Chrome

I encountered an error in Chrome saying "Uncaught ReferenceError: ActiveXObject is not defined."

Here is my code:

let TSCObj
TSCObj = new ActiveXObject("TSCActiveX.TSCLIB")
TSCObj.ActiveXopenport("TSC Alpha-2R")
TSCObj.ActiveXsendcommand("SIZE 50 mm, 50 mm")
TSCObj.ActiveXsendcommand("SPEED 4")
TSCObj.ActiveXsendcommand("DENSITY 12")
TSCObj.ActiveXsendcommand("DIRECTION 1")
TSCObj.ActiveXsendcommand("SET TEAR ON")
TSCObj.ActiveXclearbuffer()
TSCObj.ActiveXbarcode("100", "40", "128", "50", "1", "0", "2", "2", "123456789")
TSCObj.ActiveXprintlabel("1","1")
TSCObj.ActiveXcloseport()

Answer №1

ActiveX is not compatible with Chrome; it only functions properly on Internet Explorer.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Combining two interconnected projects: A guide to compiling mutual project dependencies

I am encountering difficulties while constructing a project (@red5/middleware) that relies on another project (@red5/router), which in turn depends on the initial project (@red5/middleware). When I execute the following command: rm -rf types && t ...

Using JavaScript to Detect Asynchronous Postbacks in ASP.NET AJAX

Seeking advice on the JavaScript code required to determine if an asynchronous postback is in progress. Can anyone help with this? Appreciate any assistance. ...

What could be the reason for the malfunction of the "includes" function in my JavaScript snake game

As a beginner in JavaScript, I've been learning CSS and HTML as well. I decided to practice my skills by creating a snake game without following any tutorials. I know my code might not be the best and lacks good practices, but I'm just doing this ...

Issues with React's useState hook not updating properly

As a React beginner, I am facing an issue with my input field filtering functionality. The problem arises when the results are filtered and rendered, as it seems to be ignoring the last character of the input value. For instance: If I type in "s", nothing ...

retrieving the total from the server side using JSON

When I try to add two text box values using the onkeyup event, the data is submitted to the server every time a change is made. The result is then returned in JSON format. One of the text boxes is retrieved using JSON (via the onchange event of a combo), w ...

Upon refreshing the page, nested React routes may fail to display

When I navigate to the main routes and their nested routes, everything works fine. However, I encounter an issue specifically with the nested routes like /register. When I try to refresh the page, it comes up blank with no errors in the console. The main r ...

Show the result of file upload, whether it was successful or not, using ReactJS

I need to implement an Ajax call for uploading a file to the server. I want to display success and failure messages based on the outcome of the file upload process. $.ajax({ url: "https:my_url", data: {my data: my_data}, method : "POST", success: ...

Divide the result by using ajax

In my webpage, I have an input field labeled "Model" with a datalist attribute and a select menu for "Brand". When a user selects an option from the Model input, it should dynamically update the options available in the Brand select menu. Both the Model an ...

How to implement debouncing for an asynchronous custom validator in Vue.js using vuelidate?

I encountered an issue with my validator function that checks if a username is already registered in the database. The problem was that the request was being sent to the server after every single character input, which was far too frequent. To remedy this, ...

In a Next.js application directory, how can you retrieve the router.asPath value within a function that utilizes the Next.js navigation feature?

import { useRoute } from "next/navigation" const route = useRoute() const updateData = () => { route.replace(route.asPath); } I attempted using next/router but it was unsuccessful ...

What is the reason behind arr.reverse() flipping the original array?

My goal is to reverse an array and store the reversed version in a new array without altering the original array. Here is the code I am using: var arr= ["1", "2", "5"] var arrTwo = arr.reverse(); console.log(arrTwo) \\ ["5" , "2" , "1"] console. ...

Async reaction in MobX is a powerful tool for handling

Hey there, I am currently utilizing MobX in a store and faced with the need for an asynchronous reaction to occur when a computed value changes: class Store { @observable user; @observable something; @computed get firstParam () { ret ...

Sending files to an FTP server using Vue.js

Currently, I am developing a data analysis web application that enables users to upload files to an FTP server and access results after performing calculations. My current challenge lies in creating a user-friendly interface for file uploads. The main que ...

Transferring TypeScript modules for browserifying

Recently, I transformed my canvas library from plain JavaScript to TypeScript. I have structured the code using classes, all of which are part of the cnvs module. However, I am facing difficulties in compiling these classes into a single file. My goal is ...

JavaScript runs a function at intervals when the mouse is over an element

Looking to add a simple feature (see mockup below) [+] 123 [-] When the user hovers over the + or -, the sum should increase or decrease. I've created a basic script to accomplish this (http://jsfiddle.net/wFAfy/3/). It seems to be working fine, but ...

The md-select search filter currently functions according to the ng-value, but it is important for it to also

I am using a md select search filter with multiple options available. For instance: id: 133, label:'Route1' id: 144, label:'Route2' id: 155, label:'Route3' id: 166, label:'Route4' If I input '1' ...

How can you create a pop up window that automatically refreshes the original page when closed?

I am currently utilizing the most up-to-date version of jQuery. Upon clicking this button: <input id="ShowImages" class="" type="button" value="images"> The following function is triggered: $("#ShowImages").click(function() { $("#MusicianImag ...

Express and Angular2 Webpack integration

Recently, I set up Angular 2 with Webpack and explored its routing capabilities through a sample app. I am now interested in integrating Angular2 for front end routing while utilizing ExpressJS for a RESTful API backend on the same server. For example, ht ...

Variable in Javascript file causing return value to be 'undefined'

I have encountered an issue with my JavaScript file. It is extracting data from a SharePoint list and displaying it on an HTML page, but one of the fields appears as 'undefined' even though I defined it initially. The problematic variable is &ap ...

The rotation of the camera in three.js around the Y Axis appears to be improper

Our project involves developing a VR/Stereoscopic web application using three.js to showcase the camera's viewing angle. For instance, we have set up a "room" scenario with the camera positioned in the center. The camera's rotation is linked to ...