Questions tagged as 'javascript'

3
answers

How to get JSON data

I made a list in JSON with the name of list_json.js and put it in the head of HTML, however I would like to get it in body , the codes work on the console but I can not print on the screen, what am I doing wrong? <!DOCTYPE html> <h...
asked by 29.04.2017 / 18:01
1
answer

QR Code reader ZXING in HTML - WEBQR

I'm trying to implement the reader in my web application just like on the "webqr.com" website, I've copied the entire site from index.html to the scripts (2). until that's fine I access the server through localhost and it works as in the image b...
asked by 27.04.2017 / 14:15
1
answer

Automatic calculation of averages using JAVASCRIPT or PHP

<script> var campo1 = document.getElementById("val1"); var campo2 = document.getElementById("val2"); var campo3 = document.getElementById("val3"); var operador = document.getElementById("operador"); var resultado = document.getElem...
asked by 29.04.2017 / 14:58
1
answer

Function that passes arguments dynamically to callback

How to pass arguments in a callback function (usually anonymous function)? Maybe it's hard to understand, so I'll give you an example here. I always see this in libraries like jQuery, but I do not understand how it works in "pure" JS. For...
asked by 07.06.2017 / 11:36
2
answers

Guide change identification

As you know, a user when accessing the internet will always want to access several tabs at the same time, youtube, facebook, email, etc., he gets one tab being viewed while others are at his disposal. I wonder if there is a possibility of the co...
asked by 06.06.2017 / 16:21
1
answer

How to get return a boolean after a form.submit?

I have a customer registration form that runs the submit button on the register button: document.getElementById("formularioCadastro").submit(); All ok, the registration works, but I wanted to return a BOOLEAN true or false, to see if it was...
asked by 06.06.2017 / 20:41
1
answer

How can I add paragraphs in a TEXTAREA TAG?

$("#text").on("focus", function(){ $(this).keypress(function(e){ if(e.keyCode == 13 | e.which == 13){ //this.value += '</p><p>'; document.execCommand('formatBlock', false, 'p');...
asked by 13.04.2017 / 14:20
1
answer

Help with DateTangePicker in jQuery

I'm using the jQuery Date Range Picker on a form. Follow the code in jsfiddle My problem is when I click on the input Input appears the date range picker normally, but when I click on the input date, I need it to close and open on the outpu...
asked by 05.06.2017 / 23:03
1
answer

How to make the value appear by clicking on any corner of the page JavaScript [closed]

Well, I'm having a javascript exercise that I have to make appear whether the value of a number is prime or not. But I can not, because the teacher wants the value to appear when we click on any corner of the page in the paragraph with id="messa...
asked by 14.04.2017 / 04:25
1
answer

Property forChild does not exist on type typeof IonicModule Ionic 2

I've created a new ionic project 2: ionic start myApp blank --V2 Until then, only when I create a new page: ionic g page login It is giving the following error below: Typescript Error Property 'forChild' does not exist on type 'type...
asked by 14.04.2017 / 05:00