Questions tagged as 'javascript'

2
answers

how to make an animation run according to the orientation of the mobile or the tablet?

This code is for animations to be executed as long as the width of the browser or viewport is between 480 and 800 pixels: if ( window.innerWidth > 480 && window.innerWidth < 800 ) { //aqui vienen 200 lineas de codigo de animaci...
asked by 23.11.2018 / 17:36
1
answer

how to pass a variable from js to php

Hello good afternoon I have the following code that loads me some records, but also what I would like to pass a variable taking advantage of the code. <script > var mivariable=1; $(document).ready(function(){ $("#concepto").load(...
asked by 25.11.2018 / 18:14
1
answer

Leave a select without options

I have the following select where I select a type of wood and this has sub products of this, but sometimes the wood has no sub product so it hides the select of the byproduct. But when rescuing the data and sending it to the AJAX database...
asked by 15.11.2018 / 20:03
3
answers

Counter every time an IF - ELSE conditional is used?

I need to do a simple counter for an IF-ELSE conditional, the question is simple: my code goes through the numbers from 100 to 999 and determines which are of increasing, decreasing and mixed composition. Example: creciente=159 decrecient...
asked by 22.11.2018 / 04:01
1
answer

How to empty the values of the attributes of an object in VUEJS2?

In vuejs2 I have a variable datos which is an object that already has some properties set and that are initially empty. I'm doing a series of validations that are very repetitive, an example of this is to send a request, if it br...
asked by 12.12.2018 / 19:09
2
answers

export to excel with data table

Good, I have these links. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.2.5/css/selec...
asked by 10.12.2018 / 20:16
3
answers

How to save data from a foreach in html in an array of Javascript

I'm with a project using laravel and when I get the controller data, in the view I use a foreach to recover the data sent, but I would also like each data sent to be stored in an array in Javascript to be able to operate with these. vi...
asked by 07.12.2018 / 05:31
1
answer

How can I load data into some html text fields when the first loses focus?

I have a small conflict with a project that I am working on. It turns out that I need to load the code of a material, and when it loses its focus, it is necessary to perform a search in the database, take the data from the Materials table...
asked by 10.10.2018 / 13:10
1
answer

Set resulting text on a P tag

I have the result of a promise that if I execute this, it takes me as a console to the result I want: web3.eth.getBalance(localStorage.getItem('address')).then( console.log ); But when I try to put the value in a P-label, nothing appear...
asked by 17.12.2018 / 11:18
1
answer

Keep decimals

I want to keep the decimals, I have a long number 120.29998999867869 and I want to cut it with 5 decimals, the desired result is 120.299998 , the following code I try but I get 120.30000 let num = 120.29999999867869;...
asked by 10.10.2018 / 20:51