Questions tagged as 'javascript'

2
answers

Store result of promise in a variable

How can I store the promise result in a variable? A promise returns the result of a query of the database. function consultaMarcas(){ return new Promise(function(resolve, reject) { connection.query('SELECT * FROM marca',(err, result)...
asked by 23.07.2018 / 16:35
1
answer

Disable option if you do not have Javascript enabled?

I'm using a tag that checks if Javascript is enabled, if it's not, I'd like an on-screen option to be invisible. How could I call a function if this happens? I thank you <noscript> Para completa funcionalidade deste site é necessário...
asked by 03.07.2018 / 04:57
1
answer

How to validate HTML form with Javascript?

I'm trying to do a function in javascript to validate a form, I want it the function scroll through the form and check which fields are required (required) and then add those fields to a list and then manipulate and handle the errors: <!doc...
asked by 04.07.2018 / 18:46
1
answer

Usable but invisible input

I need an Input, in which I can pass a value to it via javascript but that it is invisible. I have 3 fixed values that I will always pass one of them, SAC, Distributor or Consultant, but as I need to send those values in the form just to know wh...
asked by 03.07.2018 / 14:31
3
answers

How to change the type of label inside a table depending on what is inserted

Good afternoon, I'm trying to build a table with Bootstrap and would like to change the label type, depending on what was written inside the cell. Table example: <table> <tr> <td><span class="label label-primary">Tex...
asked by 04.07.2018 / 18:59
1
answer

Knowing if time is correct

I have an input where it is filled with hours (####: ##), for example: 1250: 00, 0800: 00, ... I need to know if it was spelled correctly and not 1250: 66, 0800: 99 There is a mask that does not allow typing letters or spaces     
asked by 03.07.2018 / 04:00
1
answer

How to compare two vectors in java script [duplicate]

I have a job to do on a topic about math, so I have to do about sets so I thought I would do an intersection that would show only the numbers that are repeated in both sets, but I'm not getting it, I was just able to collect the data and show...
asked by 03.07.2018 / 16:18
2
answers

Post php only with all fields filled out

My form is always being sent, even if there is nothing in the input, can someone give me a light? HTML: <form id="ajax" method="post"> <div class="form-group"> <input type="text" name="name" class="form-control...
asked by 29.05.2018 / 22:38
2
answers

Nothing happens when calling .php file via Ajax call in pure Javascript

I'm creating persistence on MySql server for my own web application. For this I am using xampp and phpmyadmin. I created a database in phpMyAdmin and in my application, in a javascript I have an Ajax request for a .php file that makes this co...
asked by 28.05.2018 / 23:27
4
answers

How to add a new style to an html element?

Hello, I would like your help in a problem that I did not find the solution for. I have this code: (example) .cifra.mono, .cifra.mono pre { font: 12pt 'Roboto Mono', monospace; } .c_config span { display: block; } .c_config...
asked by 30.05.2018 / 20:11