Questions tagged as 'javascript'

2
answers

JavaScript Validates Date of Birth and Block Same Year

I need a Javascript block that I put date with the same current year. For Field Date of birth. Can anyone help me? For the field: <div class="col-sm-4"> <label for="dataNasc" class="control-l...
asked by 09.02.2017 / 14:27
2
answers

Push in JSON Object AngularJS

How do I add 1 item to a json object in angularJS. In case I have: {COD: 29, MOTIVO: "teste"} And I'd like you to stay: {COD: 29, MOTIVO: "teste", ID : 12345789} Home I tried the following: $scope.cadastroSolicitacao = function(...
asked by 10.02.2017 / 20:47
2
answers

How to pass the dynamic id of a Div to a javascript function?

I'm doing a dynamic table in html and need to display the subtable just when I click on tr from the main table, follow the example. $(function () { $('#toggle3').click(function () { $('.toggle3').toggle('slow'); return...
asked by 10.02.2017 / 02:38
1
answer

Uncheck other checkboxes when selecting one

Hello, I have three checkboxes in my form and would like me to select one the other two were unmarked. I tried to use some examples I found here but it did not work as expected. Here is the HTML code and Script I tried to use. Thanks to anyone w...
asked by 10.08.2016 / 20:59
1
answer

Countdown that is renewed at midnight using pure javascript

   How do I show the missing hours and minutes by 00:00 (midnight)? Example:    I have a sales site where I want to put a countdown that tells the remaining time to midnight, which when midnight comes, appears 23h 59m 59s. It's going...
asked by 11.08.2016 / 11:26
2
answers

NodeJS Error and when using "="

Good afternoon, People I'm starting my studies with Node.js technology, however when I tried to write the code of a web server example: const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.crea...
asked by 24.05.2017 / 21:06
1
answer

I want to use sql web but I am not able to create table or insert information in it

let db = openDatabase('produto_teste','1.0','banco de dados para cadastro do produto',2*1024*1024); db.transaction(function(tx){ tx.executeSql('CREATE TABLE IF NOT referencia(\ id INTEGER NOT NULL AUTOINCREMENT,\ nome VARCHAR NOT NULL,\...
asked by 19.05.2017 / 15:56
1
answer

Subtract from a number the values to your right in a list

I have a situation that is as follows: Given an array with for example 5 positions [5, 10, 8, 2, 7] I need an algorithm that will allow me to do the following: Get 5 and subtract by the numbers that are after your position [1...
asked by 24.05.2017 / 14:03
1
answer

JavaScript Error Event definition

Good afternoon, I made a popup with jquery, and when I put it to run on element inspecte it shows an error to the following:    events: 1357 Uncaught ReferenceError: open_popup is not defined I took a look at it is talk about definition,...
asked by 05.08.2016 / 20:39
2
answers

Event on click repeating action

My code: var calendar = { init: function(org_id) { $.ajax({ url: 'http://localhost:8000/listar/' + org_id, type: 'GET', dataType: 'json' }).done(function(data) {...
asked by 28.12.2016 / 15:55