Questions tagged as 'javascript'

3
answers

convert value to 2 decimal places in JS

I have the following script: var x = "202101000000"; var y = 0; //bilhao if(x.length >= 10 && x.length <= 12){ if (x.length == 10){ y = x.substr(0,1); }else if(x.length == 11){ y = x.substr(0,2); }else if...
asked by 07.12.2017 / 14:27
1
answer

How to change chart.js display c,

I'm learning to work chartsjs I bring date, with January value with 10 clients, the scale is 0.5, 1.0,1.5,2.0 I would like to deichar with 1,2,3,4, ... there is no half client /*********************************** GRÁFICO DE LINHAS DIARIO *****...
asked by 07.12.2017 / 09:50
2
answers

Pass the GET variable by more than one page

Here is the code that is best explained. <form class="got" method="GET" action="real_time.qm.php"> <select name="papel"> <?php //Recebo as variaveis da outra pagina $loc = $_GET['loc']; $ori = $_GET['or...
asked by 06.12.2017 / 19:06
2
answers

AJAX Axios loading JavaScript

I am doing an AJAX request using the Github API by the axios and wanted to know how I do for while loading the information, it gives a console.log('carregando'); and create a component written "loading", and after that it deletes the load...
asked by 05.09.2018 / 22:07
1
answer

Save incremented value inside a JQuery click function

I have the following function. $('#proximo').click(function() { token = localStorage.getItem("userToken"); page =0; var e = document.getElementById("idSelecionaSize"); var size = e.options[e.selec...
asked by 06.12.2017 / 19:29
2
answers

Error in decoding in request

I am sending the second string via post (JavaScript) to my bootle server (Python): query = { 'wiki': 'Tr%E1%BA%A7n_H%C6%B0ng_%C4%90%E1%BA%A1o', 'uid':'f17afd66aae3a' } $.post(url, query, function(data, status){}): But when I print what I g...
asked by 05.09.2018 / 19:36
1
answer

Ajax + Php Pass Variable

How can I send a variable through Ajax and retrieve the value in PHP? <script type="text/javascript"> setInterval(function(){ $.ajax({ async: true, url: 'contalog.php', dataType: 'html', type: 'POST', cache: false, success: function(res...
asked by 11.11.2017 / 03:50
2
answers

Detect Firefox add-ons with JavaScript

I've created an extension for Chrome and Firefox, both are in their respective stores Webstore and Mozilla Addons, aim is to identify if the user has the extension installed otherwise inform you that you need to install the extension.    Note...
asked by 13.11.2017 / 22:53
2
answers

JSON Treatment

Through JQUERY, I need to make a request via POST where I will get a JSON with a token. The JSON return I get after sending the POST is this: { "Token": "e27bb0a7-e65b-4cc3-a82e-7a2a3c26a248", "Codigo": 0 } My question...
asked by 14.11.2017 / 11:55
1
answer

How do I import my CSS styles and my JS scripts into an angular project?

I have an Angular 2 project, and would like to import the scripts and stylesheets for my project. When I'm going to encapsulate my project in sessions, the angular does not properly interpret the files for the stylization of the entire projec...
asked by 22.11.2017 / 12:23