Questions tagged as 'javascript'

1
answer

mount HTML element with vanilla JS, I can not list all elements of JSON

Where is the error in my code? I am not able to list all the names in a <li> different, in my console.log(items[i].name) all the names of the JSON appear, however at the time of creating the html element it only takes the...
asked by 04.10.2017 / 18:33
2
answers

How to put legend out of HighCharts chart

Someone doyouknowhowIputthislegendoutofmychart?//CreatethechartHighcharts.stockChart('grafico_relatorio',{legend:{enabled:true},scrollbar:false,exporting:{filename:nome_da_exportacao,chartOptions:{legend:{enabled:true},//inputEnabled:falserange...
asked by 05.10.2017 / 19:35
2
answers

Get the class and name of an Input

How do I get the class ( Class ) of the following code, making a condition with the values returned by the name attribute. That is, I want if the input has a given name in its name attribute it returns me in addition to the value of...
asked by 01.02.2018 / 15:02
1
answer

How do I get the location of the user and compare with others to see which one is closest to him?

I need to capture the user's location and compare all the sites listed in a list / array and see which one is closest and show an image of the location. So far I have been able to handle errors and find where the user is. Anyone have any idea ho...
asked by 01.02.2018 / 16:15
3
answers

how could I use instead of passing an id, passing a Class on JQUERY?

I have this code here: HTML: <button class="btn btn-danger btn-circle delete" type="button"><i class="fa fa-remove"></i></b</td> $('#submit1, #submit2').click(function () { if (this.id == 'submit1') {...
asked by 11.01.2018 / 14:28
2
answers

How to store text words in an array

I need to create a function that takes a text and stores each word in an array. In C # I know the ToCharArray () function exists and with this I just need to do a "for" to and check when there is a blank space, but how do I do this in js?     
asked by 13.01.2018 / 11:42
1
answer

Sending variables in Ajax to PHP

Using php I search the DB and send the data to AJAX via JSON: echo json_encode(array('sucesso'=>true, 'mensagem'=>'Dados inseridos com sucesso','idservico'=>$idServico)); In AJAX I manipulate the variables and now I need to send th...
asked by 10.01.2018 / 18:44
1
answer

Random numbers without repetition (JavaScript) [duplicate]

Good morning, I created a small lottery game, where 06 numbers are generated between 0-20, the user informs his guess of 06 numbers and the system returns how many numbers were hit and which numbers hit. The problem is that the randomly gen...
asked by 09.01.2018 / 14:17
2
answers

Keep focus on main page

I have a page being my main screen, when selecting a value and clicking the button it will call another page that I chose, it opens in the form of PopUp. I need this PopUp to open without the focus on it, that the focus will continue on this...
asked by 12.01.2018 / 20:21
1
answer

How to download PDF file from server on ionic 2?

I'm using the MPDF_6_0 library to generate PDFs, unitarily testing works, but I can not power it through the ionic project. How to do this? Thanks to everyone in the community. import { Injectable } from '@angular/core'; import { Http,...
asked by 14.10.2017 / 04:14