Questions tagged as 'javascript'

2
answers

Sub-menu takes up while taking Javascript mouse

I'm developing a web application and when I hover the mouse over the Enter / Register it shows me a submenu  with some links, but when I go to one of the submenu links, the submenu disappears, how can I solve this problem? $(document).read...
asked by 02.02.2018 / 20:51
3
answers

How to Include and manipulate local JSON file?

I use JSON data to create the <options> of a <select> : jsonOptions.forEach(function(item) { var option = document.createElement('option'); option.text = item.description; option.value = item.prod...
asked by 12.01.2018 / 13:28
4
answers

Upload Image via javascript

I tried to upload image by JS but I could not do it through onload , it follows the code I tried: HTML: <img class="razer" id="imageoption" onload="imageOption()"> JS: document.onload = function imageOption() {...
asked by 16.02.2018 / 19:32
1
answer

Use if () inside .catch () - error: unexpected token if

It is as follows I'm new to javascript and I'm not sure how to handle this error. I'm trying to call a function and putting a .catch() to avoid the error UnhandledPromiseRejectionWarning shortly after it, but I would like to check...
asked by 25.01.2017 / 23:52
1
answer

Chosen Jquery: remove selection when typing DEL

In the example Chosen - Allow Deselect on Single Selects is implemented the possibility of deselect the selection. But the same only works with the Mouse, that is, with the keyboard has not (not discovered) how to remove the selection. For...
asked by 13.01.2017 / 22:15
2
answers

How to identify changed value in input

How to identify if a setting value has changed in input ? I have the prototype below, however, the alert will be displayed according to the number of times the class="ultimo-valor" appears in the code. <input class="ulti...
asked by 20.01.2017 / 23:02
1
answer

How to export a DIV with graphics to PDF

Does anyone have any javascript code that exports a graphics div to a .PDF file?     
asked by 28.03.2016 / 16:28
1
answer

Problem with boolean checks in JavaScript

var a = '0'; if (!a) console.log('false'); if (a == false) console.log('false 2'); False is not displayed, but false 2 is?     
asked by 09.03.2016 / 23:43
2
answers

JavaScript does not take on pages added later

I have a problem, which gives me a big question. I'm developing a website that has a default structure, which makes GET calls in Jquery to fetch new HTML pages for certain parts of the page. Example: I click on a link and the page c...
asked by 24.03.2016 / 01:06
1
answer

Javascript set value of one field in others

I have the following code below <script type="text/javascript"> function getValue() { var x = document.getElementById("NuJaneiro"); document.getElementById("NuFevereiro").value = x.value; } </script> <td...
asked by 17.12.2015 / 18:35