Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing index pages (147474 articles)
↧

How do I randomize the position of bezier vertices?

How do I make random bezier curves using randomized vertex positions on a canvas (above a background image)?This is the code I'm currently using (I'm only getting a black background, no shapes are...

View Article


Elegant way to return a filter function from an HTML element

I've made a very large HTML form with many controls, which adds multiple filters to a large set of data. I wanted an efficient and elegant way to define a filter function for each control, to use with...

View Article


Set cookie using JavaScript if not already set

First thing, keep in mind that I never used Javascript by myself (only took some script who worked at 100%) and same for the Objet Programming (learned the programmation on Pascal, 12 years ago).Now, I...

View Article

How to use backstage to push to a gitlab repository with a user specifif...

I have a question and hopefully someone is able to help me. My plan is to use backstage to push some Kubernetes yaml files to gitlab and every logged in user should be able to do this with its own...

View Article

Get DOM element in an iframe in JavaScript

I have two documents, one of which is embedded into the other with an iframe. I'm trying to use this code to access the img tag inside the iframe, however, I cannot use the document.getElementById...

View Article


Using jQuery and AngularJS together?

I'm new to AngularJS, and this project pushes what I already know about using ng-repeat and controllers. Goal : To make it so when you select an option from the drop down menu and click the button, the...

View Article

How to get page numbers in pdf generated by html with wkhtmltopdf

Here is our answer:We are currently using wkhtmltopdf to generate a PDF from a given html template. Some background information:We are using Sulu CMF to build our back end, which is based on...

View Article

Copy the content of one HTML table into another using JavaScript Revisited

I'm teaching myself JavaScript and I need to copy one table into another. I've been able to reproduce @Gushiken's code and @Quentin's response with this example:HTML:<button...

View Article


Integrating SEO with react project [closed]

I am working on a React js project and i got a task to integrate SEO with this project. I tried to get some open source and step by step process of integrating seo and how to plug in tags and end...

View Article


Image may be NSFW.
Clik here to view.

Pyodide - UI input instead of prompt

I am trying to run a python programming with pyodide, where the program has x =input(). This will ask the user input in prompt. Now I need to show the input in UI(DOM) await for input before executing...

View Article

Different ways of calling an onClick function with navigator.clipboard

In each of the following lines of code, I want to copy the url of my website after clicking a button.Case 1)const [currentUrl, setCurrentUrl] = useState('')useEffect(() => { if (typeof window !==...

View Article

Is Array.prototype.reduce more efficient than Math.sumPrecise for summing an...

The classical way for summing an array of numbers in JS is arr.reduce((a, b) => a + b).In 2026, Math.sumPrecise() was added to the specification to enable summing a list of floating-point numbers...

View Article

How to clear input after onClick with ReactJS

I need to implement a clear/reset for the inputs after onClick occurs, and also after it is stored in localStorage. I can't seem to figure out how to code this and where. Here is my add function and...

View Article


How to programmatically create a file and write content using VS Code...

I am building a VS Code extension that automatically generates workspace files. I want to create a new file at a specific path inside the user's open workspace and insert generated text content into...

View Article

Image may be NSFW.
Clik here to view.

How to detect when the BROWSER blocks an iFrame

On an https website, I'm trying to load randomly submitted URLs into an iframe, allowing the user to see that website embedded in my own user interface.As long as the remote url is https (like my own...

View Article


can I make choosing a file count as a user gesture?

I am making a very simple video player. I want the video to display in full screen mode. I give the user two ways to choose a file to play. One works and one does not. The way that works listens to a...

View Article

Access dom by web worker

I am getting crazy and need your help. I am working on a serviceworker project and I am dealing with a javascript problem. I have two main files. The server.html file in which I call the external...

View Article


Error: function timed out, ensure the promise resolves within XXX, due to...

Nightwatch with Cucumber. I want to check if the elements listed in an Excel sheet are present on the webpage. To do this, a sequential promise(using reduce) is written to ensure that the page loads...

View Article

Image may be NSFW.
Clik here to view.

How can I cascade delete with one-to-many relation in typeORM?

I have group and contact entities in OneToMany relationship. I add contacts within the group. When I want to delete, I want both sides of the database to be deleted. but only the group table is...

View Article

Image may be NSFW.
Clik here to view.

Next JS Link works correctly in desktop view but not in mobile view

I have one vertical navbar. When the width falls below 951 pixels, I take this navbar from the verticalnavbar class and throw it into the nav-links in my navbar class to provide a hamburger view. There...

View Article
Browsing index pages (147474 articles)


Latest Images