Questions tagged as 'javascript'

1
answer

Ajax with jquery in Symfony

I have the following code: On the route I defined it like this: ajaxordersku: path: /ajaxordersku defaults: { _controller: AppBundle:Admin:orderskufororderid } methods: [GET] In the controller that you belong to the path defi...
asked by 04.08.2017 / 22:16
1
answer

ajax.reload () DOES NOT work

I am working on a project for the institute but I can not make it through ajax the DataTable is reloaded after inserting the record in the DB and in the console this error is generated: Uncaught TypeError: Cannot read property 'ajax' of undefi...
asked by 22.09.2017 / 01:15
2
answers

Show elements of an array if they are repeated and if they match your position

I have this script currently showing me the repeated numbers between 2 arrays but I can not do it to show me the repeated numbers and if their position matches var number_load = [2,3,4,1] var number_input = [9,5,3,1] for(var numbers...
asked by 21.09.2017 / 17:04
2
answers

How many conditions can I add in a while loop?

I start in the programming and I come to your help. I made a while loop which responds correctly when I add a condition, however when I add a 2nd condition the loop goes into an infinite cycle even though the conditions are true and must co...
asked by 25.07.2017 / 16:12
1
answer

Error connecting to the Socket server

There is some way to catch if the socket server I'm trying to connect to is (off, not available etc.). This is my code: import http from 'http'; import socket_io from 'socket.io'; In the event of my button try{ var net = require...
asked by 21.09.2017 / 19:02
2
answers

Why does not print what you want in console [closed]

var subGrupos = { none:-1, aoa:1, lacteos:2 }; var Eqs = { verduras:0, frutas:1, cereales:2, leguminosas:3, aoa_mba:4, aoa_ba:5, aoa_ma:6, aoa_aa:7, leche_des:8, leche_semi:9, leche_ente...
asked by 26.07.2017 / 21:40
2
answers

Convert an image to base64 - Javascript

How do I do a function similar to the following, but in Javascript? // PHP file <?php $path = 'images/imagen.png'; $type = pathinfo($path, PATHINFO_EXTENSION); $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,'...
asked by 26.07.2017 / 22:02
2
answers

Change text of a label with javascript

Greetings. I have an Onblur event in Textbox : <asp:TextBox ID="us" runat="server" MaxLength="15" onblur="validar(this.id)" Width="232px"></asp:TextBox> Then a Label : <asp:Label ID="Label1" runat="server" Text...
asked by 21.07.2017 / 18:21
1
answer

How to identify repeated instances?

function Cell(){ this.id = null; this.name = ""; } var x = [1,4,5,9,17,25,254,4]; var i = 0; var l = x.length; for(;i<l;i++) { var b = new Cell(); b.id = x[i]; console.log(b.id); } I have a...
asked by 21.07.2017 / 23:04
1
answer

Reload my AJAX table

I am trying to make a table update automatically, by calling AJAX , for example when I change the range of dates these are sent to a model that executes a function and takes the parameters and performs the query. The problem here is tha...
asked by 20.07.2017 / 19:07