Questions tagged as 'javascript'

2
answers

How do I find out if the browser console is open?

Is there any way to capture information that the browser console is open? Currently I make a script that checks if the height of the browser has changed ... but in case it strips the browser console, or even, modify to the side, the script does...
asked by 29.05.2018 / 21:57
2
answers

How do I apply a ZIP mask on a column of a DataTable using JavaScript?

I have a DataTable in my View Index that has the CEP column that needs to have a zip code mask (ex: 29780-000). Does anyone know how to do this using JavaScript? <table class="table table-hover table-bordered dataTable table-striped wid...
asked by 25.05.2018 / 22:38
1
answer

If all fields are valid send notification and send email if no errors are displayed

Checking a contact form with success and error messages Attention to the corrections I have made over time! PHP CODE if (isset($_POST['contact'])) { $nomecomp = test_input($_POST["nomecomp"]); if (!preg_match("/^[a-zA-Z ]*$/"...
asked by 28.05.2018 / 16:15
1
answer

How to list an Array with .map ()?

How can I list an Array using .map ()? in the example below, I was able to list using a for loop, how can I get the same result using a .map ()? var students = [ { name: 'Anna', grade: 6 }, { name:...
asked by 26.05.2018 / 16:07
3
answers

How to return the value of type radio

Good morning! I'm having a problem I'm trying to return the value of a radio field by printing on the screen to give a type of return to the user before clicking the send. I'm currently testing on top of a script I found, but without much suc...
asked by 28.05.2018 / 16:12
1
answer

Do not accept duplicate values in a Regular Expression (Regex)

I have the following code: var str = "141271999 243306211 172266710 172266710 172266710"; var regex = /[0-9]{9}/g; //Encontrar 9 números entre 0-9 e retornar todos valores (g). var idsEncontrados = str.match(regex); How can I configure my...
asked by 22.05.2018 / 14:51
2
answers

Array list in multidimensional array

I have this loop: aaff = [];contador_selecionados=0; $(' .values .layout .acf-input').children('').each(function(index,element){ contador_selecionados++; aaff.push( element.value); console.log(contador_selecionados); }); console.log(aaff);...
asked by 15.10.2018 / 19:25
2
answers

How can I print a variable from within the JavaScript script?

The question is exactly how do I "start" a value from within my JavaScript code so I can track whether the variable has the correct value. I'm learning JavaScript in college and was writing a paper that takes the code down. However after some...
asked by 17.10.2018 / 19:00
1
answer

Field checkbox is not recognized marked

I have these two fields checkbox <label class="control-label col-md-3" style="text-align:left;">Tipo de Pedido</label> <div class="col-sm-3" style="text-align:left;"> <input type="checkbox" asp-for="Produtos...
asked by 15.10.2018 / 20:27
1
answer

Can not use v-for directive on prop passed to Vue component

Follow the code: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8" /> <title>Passagem de valores com VueJS</title> </head> <body> <div id="a...
asked by 14.10.2018 / 02:46