Questions tagged as 'javascript'

2
answers

Remove disabled attribute when a condition is satisfied

Good evening. I'm trying to make a log and login screen for an application that will save the data to localStorage . To prevent the user from registering with incomplete data, I disabled the submit button using disabled . My in...
asked by 15.04.2017 / 06:55
1
answer

How to convert jQuery .on function to pure JavaScript

Today I started trying to transform a function that I'm using in jQuery (which @ Jose helped me implement in this answer ) to .on , for pure JavaScript, but I'm facing some difficulties. The online courses I have already done did not addr...
asked by 11.06.2015 / 02:34
3
answers

Method Object.values () does not work in internet explorer 9

Personally I have a problem. In a javascript file we use the Object.values () method that normally takes an object and returns an array. But on the internet explore 9 does not work. Could someone help? code example: var json = '{"6":{"dataI...
asked by 17.03.2017 / 12:29
3
answers

Step in a cycle for

I want to put the values between -20 and 30 within a array , the part of a size that is 10. My problem is that I can put the values, but the size of the array gets with 11 values. max=30; min=-20; step=10; arr_text_y=[]; var calc...
asked by 23.05.2015 / 13:14
1
answer

Sorting ASC and DESC without losing variable value

I am trying to perform a sort order of records on a page by firing a List / Menu, but when I fire it, I am losing variable values from a first selection. When I enter the products page, I already place a $ dep variable and show the result. Wh...
asked by 28.01.2015 / 14:46
2
answers

How to query a data in an array in Javascript

I'm a beginner, first and foremost. A final challenge has been proposed in the Alura system in which you have to ask for 6 numbers for a user and draw 6, then compare the arrays to see how many were successful. It's a Mega Sena game. I wan...
asked by 03.02.2015 / 14:15
1
answer

How do I remove bookmarks from a map with the v3 API?

I am developing an application to design routes from data collected by an embedded GPS system. My server receives coordinates of different devices and I am writing this to my database. What helped me a lot was this question in StackOverflow...
asked by 05.02.2015 / 03:16
2
answers

"Break" or "return false"?

Within a function there is a repetition structure, how much processing savings, which one is the best? JavaScript function minhaFuncao(boom){ for(i = boom; i > 10; i--){ if(i < 0){ break; } } }...
asked by 10.07.2014 / 02:56
1
answer

WebWorker and Async - What's the difference and when to use it?

I'm specifically studying a WebWorker implementation, and I did not quite understand the difference between WebWorker and Async in JavaScript, whereas WebWorker gives me an asynchronous solution with a better (or better) code organization....
asked by 27.04.2017 / 16:08
2
answers

How to pass an array of StdClass php objects to a JS variable using $ .ajax () jquery

I have the structure below. I need to access each value in jquery. Array ( [0] => stdClass Object ( [post_id] => 140 ) [1] => stdClass Object ( [post_id] => 141 )...
asked by 20.10.2015 / 21:06