I currently have a string and set of substrings/search strings which I want to effectively search in the given string. This is what I have currently: This approach works, however I am looking for a more compact and efficent way of searching for substrings in a given string. Edit: I am currently using the foll…
How can I change the margin of the element with a variable in JavaScript?
I am quite a beginner and trying to learn JavaScript. I am trying to improve an example for Popup. I want to adjust the left margin of the popup so I can center the element to the text. I added the CSS for reference but I am trying to do it in JS. Basically the problem is if I put
How to easily display Image from Node JS
I can’t find a simple solution how to display an image on my website. I can read it in my node js backend but it will download the file instead of placing in my img tag. Do you have a simple solution for that? Thank you very much! HTML NODE JS Answer The problem you face here is not how
Uncaught ReferenceError: deleteNote is not defined at HTMLButtonElement.onclick
so, i just learn about make some website with flask. everything was fine until this error makes me crazy. can u solve my problem? this is my def function to delete some note and this is my .js code and this is how i make the button with html can u help me? i dont know how to solve it.
What is the canonical way to manually fire page_view in Google Tag Manager and Google Analytics 4 (GA4)?
My website is a single page app (SPA) that never changes browser history or the page title. Therefore, it’s my understanding that I have two options if I want to capture page_view events: Add browser history and a unique title for every virtual page. Manually fire a page_view in SPA code. I’m goin…
Is this a good practice? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question I`m doing a project with react and I decided to make routes functionali…
Row results from Tedious Request.on not being saved
I have a function queryDatabase() in my nodeJS application, which is responsible for querying an Azure SQL DB and returning the result, using the Tedious library to connect to the DB. Currently, to return the data retrieved from the DB I am iterating through the rows returned by the query, saving the data to …
How to access full email source code in thunderbird message_display_action extension?
I am building an extension in Thunderbird with UI element message_display_action for my school project. I am wondering if I can access full email source code from java script file that I am using for building up my html page when pressing on button my extension. I found a funciton named getFull(messageId) in …
How can I rewrite this conditional css using classnames?
In react component, I’m using css module and I got this conditional css that is working fine, but I would like to refactor it using classnames library. So I tried this but I get error msg saying active will always return false. I also tried styles.activeLabel: active === true, but I get another error me…
Stomp Client in Web Browser without Websockets
I have a Node.js app in which I use stomp-client to connect and subscribe to an ActiveMQ topic without websockets. My code is the same as this example: https://www.npmjs.com/package/stomp-client#super-basic-example. Now, I want to do the same thing, but with a Vue.js application. So, I want to subscribe to an…