488 questions with no answers
0
votes
0
answers
183
views
Issue with Injecting Text into WhatsApp Web Input via JavaScript Extension
I'm working on a JavaScript extension for WhatsApp Web, and I'm facing a problem I can't seem to solve. The goal of my extension is to correct and manipulate the text in the message input of WhatsApp ...
0
votes
0
answers
45
views
Why does offsetHeight log an increased height when called from object than what is shown in the object log itself?
I have an object taken from the DOM who's actual offsetHeight I can not correctly get.
When trying to console.log the object to check the property, it does show the correct offsetHeight. But when I ...
0
votes
0
answers
117
views
Why does the GeoJSON format expect coordinates in an array rather than an object with keys?
Take the following example from their home page:
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]...
0
votes
0
answers
74
views
display button into html form failed with initialize
My script doesn’t work well.
When the button “b5” clicked with ouside <form ...> ... element, the buttons b5 and b4 deseapper and the buttons b1,b2,b3 appear. This work normaly when my code ...
1
vote
0
answers
47
views
How to retain scrollbar position even after reloading using javascript
After clicking on any lower check box in the grid the vertical scrollbar position changed to top level in the grid. How to keep the vertical scrollbar in same position after reloading the grid.?
after ...
0
votes
0
answers
24
views
Google Sheet - Image as button
I would like to use an image as a button for me to go to another cell in the same sheet. Happy if I can get someone to share the appropriate scripts. Thanks
I have tried a button to go to another ...
0
votes
0
answers
41
views
how to click cq-toggle element dynamically using javascript
how to click cq-toggle element dynamically using javascript?
When i click manually on cq-toggle menu item it actually adds active class to the element cq-toggle and add one div content in document ...
0
votes
0
answers
36
views
Why the first get undefined and after the wrong condition only the superheroname works?
document.getElementById("btn1").onclick = function() {
let username;
let age;
while (true) {
username = prompt("Enter name please");
if (!isNaN(username)) {
...
1
vote
0
answers
294
views
document.querySelector() returns null for an existing element
I have issues selecting certain elements on a specific web page, querySelector returns null unless I first go through one of the parent element.
I tried chaining them together but still I eventually ...
1
vote
0
answers
55
views
JavaScript Module Object Cannot be Identified, Resulting in this Error: "TypeError: Cannot read properties of undefined (reading 'getNodeItem')"
As a preface for my question, I am very new to JavaScript and come from a strongly-typed language background (e.g. Java and C++). Although I have prior experience with JavaScript, I am not entirely ...
1
vote
0
answers
35
views
proxy for 3d array, knowing the two indexes of array inside the handler function
I have this JavaScript Proxy code which I want to trigger the set handler that can tell me the first and second keys.
This means that when I try to set globalVar.a.b = "55b" only the line ...
1
vote
0
answers
31
views
Why does the name of a property change what access method works?
I have an object named facility
facility = {
facility_id: 495867,
facility_name: "4 Pig farms Brookvale",
registered_business_name: "BROOKVALE FARMS COMPANY PTY LTD",
...
1
vote
0
answers
35
views
Show more / show less in angular
<ng-container *ngFor="let item1 of errorItem.controls.errortype.value">
<ng-container *ngFor="let item of notesLog.slice(0,showmoreless ? undefined : 3)"> ...
0
votes
0
answers
54
views
Avoid infinite loop when using a JavaScript for loop to iterate over an array and call gtag events
I am working on tracking user engagement with an ecommerce store. One of the features is adding a shopping list of items to your cart. This event has a datalayer instance which gets overwritten when ...
1
vote
0
answers
40
views
Unable to load text from textarea to docx
Need to load outputTextElem text from textarea as a docx document on button click. But the existing method will not work:
const downloadBtn = document.querySelector("#download-btn");
...