Questions tagged as 'javascript'

3
answers

Unlock field when selecting Chekbox

Scenario: I have a table where the employee can see the data that the company has of it. I need an option for the employee to report disagreements on their cadastral data. When you click the button, it will open a screen that will contain all...
asked by 13.02.2015 / 13:21
2
answers

How to transform the value of a variable into the property name of an object? [duplicate]

I have this code sample: var a = 'foo'; var b = {a:'2'}; b.foo //undefined What I want is that b.foo exists and returns "2" in this example, but when creating the variable "b" the variable "a" ceases to exist when called inside the object...
asked by 15.02.2016 / 17:39
4
answers

View form when the password is set

I have this code: <html> <head> <script> function validarSenha(){ senha1 = document.f1.senha1.value senha2 = document.f1.senha2.value if (senha1 == senha2) { alert("PASS OK");...
asked by 18.03.2016 / 15:14
1
answer

How to submit form without giving refresh on the page?

I made a code that after selecting the radio button it sends to a page but it is giving refresh and I do not want it I want it not refresh on the page but keep sending and also I want when sending it appears a alert I...
asked by 23.10.2015 / 00:06
6
answers

Hide div after selecting another category

Select code <select name="category" class="form-control" id="category"> <option value="">Escolha uma categoria</option> <optgroup label="Vehicle"> <option v...
asked by 03.03.2015 / 17:17
1
answer

How do the onclick event work on a button where the parent already has an onlick?

I have a div parent that in it occurs an event onclick in the div integer, however within that div I want to have an element that also has a onclick event that is triggered without triggering onclick of%...
asked by 15.08.2018 / 19:26
3
answers

Are variables automatically executed when declared?

For example, if we save a setInterval() to a variable, does it already run automatically even though that variable has not been called anywhere? Example: let i = 0; let myInterval = setInterval(function(){ console.log(i++)...
asked by 06.08.2018 / 21:10
4
answers

jQuery Hover does not work

I have <button> on the page that after an action receives a new class, in this new class I need to hover the text to change, but it does not work, the new class does not seem to be recognized, can someone please help me? After an...
asked by 29.06.2017 / 18:03
3
answers

Error getting element by class (but with ID)

I'm trying to get a video element through the CLASS, (which sounds silly to me), But I'm not getting it, see my example: <script src="jquery-3.2.1.js"></script> <video id="Video1" class="video-stream" src="https://www.htm...
asked by 11.05.2017 / 08:59
2
answers

Add variables with Javascript

I have the following function in Javascript: function soma(){ var pacote = document.getElementsByName('Pacote'); for (var i = 0; i < pacote.length; i++){ if ( pacote[i].checked ) { if(pacote[i].value == "Pacote i"){...
asked by 31.08.2015 / 15:38