Questions tagged as 'javascript'

4
answers

I have a fixed menu, how do anchoring (internal #links) under the menu?

I'm working on a site that has a navbar and a menu (the height of the two adds 101px) , which scrolls to them, they pin at the top of the screen and float. p> I want the anchors I set on the page not to be overridden by the menu when clicked...
asked by 13.03.2018 / 15:45
1
answer

How to Rebuild an Array with New Values

How do I get an array in Jquery that has for example 3 numerical values and recreates it with 3 new values?     
asked by 27.10.2017 / 13:40
1
answer

Check if reCAPTCHA has been marked

I am using an email form in PHP with POST method and I use Google ReCaptcha. I need to check in javascript or jQuery, if reCAPTCHA has been marked to only enable the submit button. The current code: var checado = false; jQuery("#recaptcha-...
asked by 31.10.2017 / 16:08
2
answers

Read txt file and do javascript validations

I have a txt file that contains more than a thousand lines, each line has a number that needs to be validated by a javascript script that I have ready. I would like some script in php or javascript even read the file in txt, take line by line...
asked by 27.10.2017 / 23:32
1
answer

Wait for variable completion

Hello, I have the following array ["lucas", "peter", "john"] I need to send a request with XMLHttpRequest for each name, then save the response in json of the 3 in an object and call another function, the problem is that I do not know how...
asked by 09.11.2017 / 06:41
1
answer

Compare 2 arrays and create a new array if they have the same ID

I have 2 arrays: array1 = [ ... { "id_projeto": 4, "sigla": "ADM-APR", "nome": "Administração APR", "descricao": null, "atividades": [ 13, 14, 49, 80, 81, 82 ] // id } ... ]; array2 = [ ... } "id_atividade": 49, //id...
asked by 02.11.2017 / 10:23
2
answers

Refresh div with checked checkbox value

I have these checkboxes on my page <input type="checkbox" name="dezenas[]" value="01" /> <input type="checkbox" name="dezenas[]" value="02" /> <input type="checkbox" name="dezenas[]" value="03" /> <input type="checkbox" na...
asked by 03.11.2017 / 15:37
2
answers

Get first value before comma

Hello, I'm having trouble storing the value of the day before the comma: <span id="organizerContainer-date">Novembro 3, 2018</span> I would like to store this value to do some things. If anyone has done this before could you let...
asked by 03.11.2017 / 21:20
1
answer

How to use a function of an object as an argument of another function

This is my function that receives an object and uses the attributes of type " function ". FrameWork.prototype.loop = function (objectLoop) { objectLoop.draw(); objectLoop.update(); window.requestAnimationFrame(this.loop.bind(this)...
asked by 02.11.2017 / 20:40
2
answers

Two events in function - jQuery

I have a function in jQuery which I do through the .on('change') event, but I also needed that same function to happen on page load, but I do not know how to do this, call two events in a function. Function code in jQuery...
asked by 03.11.2017 / 18:04