Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138134 articles
Browse latest View live
↧

In Django 3 how do I access my templates-directory using Javascript?

Maybe I am going about this the wrong way. I want to replace the content of the <nav>-element using jQuery.load() when the user clicks a certain <div>. But I am unable to access the...

View Article


Adjusting the brightness of an image using canvas context in Microsoft Edge

I am building an application where I need to be able to capture a frame-grab from a web camera and upload it to the application. To do this, I am using WebRTC to capture the image from the video...

View Article


Send Google Analytics to two accounts

I know there are many posts about this, but I can't find a solution that works for us.We have an application that we track in Google analytics using Tag Manager. But each page should be able to send...

View Article

Upload multiple files from Smartphones via file upload

I ran into a problem with file upload on smartphones. My Website needs multiple pdfs from one file upload. On smartphones (just tested iPhone until now) i can select multiple images, but when i browse...

View Article

Google Place API Autocomplete

I have a MCV application and there is a field that have to be filled with addresses from google maps. Searching online I see that I have to use Google Place API but all the example are old, before the...

View Article


How can I create a popup window from login in the navigation bar - WEB [closed]

I am facing a problem creating a popup window from a login link in the navigation bar? what syntax is better for this? thanks,

View Article

Proper way to handle race condition for 3 microservices. (Promise.all ?)

How sure I am that promise.all will run the promise request one by one?Scenario I have 3 services. frontend, uploader, and apifrontend is the client, uploader handles google storage related actions,...

View Article

How do I use JS/JQ on button to get value from an element which is in the...

I'm trying to create a pseudo e-commerce website for my end-semester project and I've been wondering the logic behind it.I want a button to get the value of an element(price of an item), which is in...

View Article


Best way to recurrently call an external API in JS/Sails.JS?

I'm actually working on an SailsJS app and need to make recurrent call to a Java API (SpringBoot/Hibernate).Is there any better way to call this API every x seconds (or on API change), than doing an...

View Article


Calling the function on every iteration of for loop in Javascript

function myFunction(xml) { var i; var xmlDoc = xml.responseXML; var table = "<tr><th>Title</th><th>Author</th><th>Cover...

View Article

Load already live HTML file from server instead of browser cache

I have a live website, but as changes are always there, I need the user to view the latest HTML files, i.e. load the files from the server instead of browser cache.When this website went live I didn't...

View Article

Image may be NSFW.
Clik here to view.

Create an isometric projection tile for a tile map with Pixi JS?

I decided against using sprites and to create the tile dynamically with PIXI.Graphics, but I'm not sure where to start. I can create basic shapes like squares and rectangles but I need some help in a...

View Article

Count objects in array by property value and display result in HTML

I'm trying to add the count number of modelname and append it to the span element. I first tried to target an ID with length, something like this, but I couldn't get it to work. What's the best way to...

View Article


Is there a shortcut to create padded array in JavaScript?

I have this javascript:function padded_array(k, value){ var a = []; a[k] = value; return a; } padded_array(3, "hello"); //=> [undefined, undefined, undefined, 'hello'] Is it possible to shorten the...

View Article

How do I access the user selected text within an element ui input?

I want to access the text within an ElInput component via Javascript in Electron. According to mozilla it is impossible to access information within an html input or textfield via window.getSelection....

View Article


HERE Javascript API: Random Tile loading Errors

I'm using the HERE Maps Javascript API to display a map in my Angular Website. Most of the time it's working fine, but sometimes I'll get an error and the map does not render. This is the...

View Article

Saving position of divs

In index.blade.php I have 2 big divs: content div-where my created divs are located, area div-where I need to move and save position of divs on refresh page: Here is my content div: <div...

View Article


Image may be NSFW.
Clik here to view.

Highlight words inside of input textarea

I need to create a input textarea that recognize words from the array of words in this.state and highlight the words while the user type the text:expected results:the array of words: the input...

View Article

i want to know about can i read two json files in one route?

Students.JSON{ "Students" : [ {"ID" : "1" , "Name" : "janaka", "Grade" : "A" }, {"ID" : "2" , "Name" : "Darshana", "Grade" : "B"parent.JSON{ "parents" : [ {"pID" : "1" , "pName" : "janaka ravindra" },...

View Article

Solving this JS problem using Array.prototype.filter()

I've solved the problem below by using a nested for loop, with the some() and startsWith() methods. Is there a way to solve this using filter() instead? Thanks in advance! Write the function...

View Article
Browsing all 138134 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>