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

Retrieving data from JSON object with similar keys

I have JSON data that is returned from a AJAX GET request. This request returns different sets of meals and how to make them including the ingredients needed and their measurements. Snippet of JSON...

View Article


javascript websocket with ip from php variable

I am using a webserver on a raspberry pi that needs a websocket to stream data. Since it can connect to multiple wifi network or even 4G, its IP may vary. Installed on the Pi I have a script that...

View Article


wy is the function insert() cant insert (+,/,*,-,%,.)sign

I built this calculator with js and html and it work fine ,but when I put the code inside php in echo statement the(+,-,*,/,%,.)signs doesnt work i dont know why?I mean it should dipslay the number and...

View Article

How to check if $('.name') contains a specific value

I’d like to check if a specific value is in $('.name'). How can I achieve this? I can’t loop through $('.name'), because I already loop through an array to check if each entry is in $('.name'). It is...

View Article

How can I set the background color in react-navigation 5

I am using react-navigation@5.0.0 and I have added a background color to my root <View />.It seems that another view created by react-navigation is having some background color set, because I...

View Article


How top update DeltaY clock in three.js on scroll (top/bottom)

I have an animation prototype - which plays on scroll - is there a way to reset animation on scroll to top/bottom? Basically from the top it plays and stops when it reaches the bottom? Right now the...

View Article

Finding moment.js objects within an array of moments?

I have an array of moment() moment.js objects. The objects contain a date, and a starting time, there can be N number of objects for any given day.I can't sort out how to search the array and return...

View Article

Remove ::hover effect on mobile when touched

when on mobile once I click on my anchor element hover effect activates, this is fine on deskpot (as designed) but I don't want the effects to apply on mobile, I have tried disabling them using media...

View Article


React : material-ui-pickers date-io Jalaali Utils returns error : TypeError:...

This is NOT a duplication of https://github.com/mui-org/material-ui-pickers/issues/1440 because I don't have problems with the original usage. According to this link here...

View Article


Vue.js/Nuxt.js - How to pass props to slots?

So i have one grandparent component which has this code:<template> <div> <Question qtype="single" qroot="1"> <Answer qpoints="5" aid="1" qcorrect>Option 1</Answer>...

View Article

Why it's not fetching the data from the modal?

PS: The datas are already displaying on browserThe only problem is I'm not fetching the data when opening the modal and I want to edit the current info into new info using the modalI think the problem...

View Article

Most efficient way to compare single array items in JS

I have an array of integers, lets say const foo = [2,5,6,2...]I would like to create a function that compare all the items and return true if one item is exactly the double of any other, and false if...

View Article

Javascript regex allow only \w and exceptional characters

var string = "Ç<>iğ^%+/dem Öçğö"; var check_w = string.search(/\w/g); //sadly this not accept "öığüşç" characters var check_utf = string.search(/[öığüşç]/gi); if (check_w != -1 &&...

View Article


How to Submit AJAX Post onchange

I'm trying to figure out why this isn't working, I don't want to have a submit button to click, It does work if I have one though, instead I use onchange="this.form.submit()" and that posts the form as...

View Article

External play / pause button for a video inside of an iFrame, html5 video...

I am using bmoren's amazing HTML5 Non-Linear-Player, found on GitHub.I am using the non-linear player in an iFrame, playing 23 videos in a no-repeat random sequence. I do not want to use the native...

View Article


Why all functional components change together in Preact?

I use Preact for my program. In one part I generate multiple instances of a functional component. Every time I change one component variable others going to change with that component so. Here is my...

View Article

Angular highcharts is returning error trying to draw a histogram

I'm trying to implement this histogram using highcharts and highcharts-angular. I implemented both libraries and got the "Hello World" chart working. But as soon as I try to change its chart type to...

View Article


Call external javascript function from thymeleaf

I'm trying to call an external javascript function from thymeleaf.HTML<!DOCTYPE html> <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8">...

View Article

Retrieve an evenly distributed number of elements from an array

I know how to extract every nth item in an array, but what I have difficulties with is the following:How can I extract every nth item from an array of 1800 elements, always including the first and the...

View Article

Print out all objects with keys and values

I'm working on a project that requires me to print out all objects, I have to use nested for in loops.The result should be printed like this:team: Manchester United stadium: name:The Valley...

View Article
Browsing all 139833 articles
Browse latest View live


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