Questions tagged as 'javascript'

1
answer

Problems with counter

I have the following counter: It is inside a table in which foods are selected through a checkbox; So, its function is to calculate the sum of the kcal of the foods that are selected. The problem is that it is used in several sections of...
asked by 01.07.2017 / 17:51
1
answer

Convert String to unicode and vice versa

Why does not this code work for me? What I want to achieve is to convert a string to unicode format var clanes = []; var txt = "Hola"; var to = ""; var c = txt.split(''); for(var i=1; i<txt.length; i++) { to += txt.cha...
asked by 28.06.2017 / 19:00
2
answers

keep selected HTML list item by clicking anywhere on the page

I am working with html and js, I have a series of icons as items in an HTML list that are part of a form, which if an icon is selected, the icon background changes to distinguish that icon is selected, and I get the name of the icon class in a t...
asked by 07.12.2017 / 22:14
2
answers

Error sending data by AJAX to Method in ASP.NET

Hello friends, I'm working with ASP.NET / C # and I'm trying to pass a parameter through AJAX ... but I get this error, I recently published a very similar question, where I did the same but from a ActionLink but as I am now passing the...
asked by 21.12.2017 / 16:04
2
answers

Problem when traversing an array in javascript

I have the following problem when traversing an array from javascript Var arreglo = [1,2,3]; Arreglo.map(function( item , index ) { // en la primera iteracion el valor de item es undefined Console.log(item); // y quisiera saber como hago p...
asked by 21.12.2017 / 20:54
1
answer

Use own server with phonegap

Good! I'm trying to test my application on phonegap. My application consists of a "Public" directory with the front-end, and a "Server" folder with the server. If I copy all the contents of the "Public" directory in the www directory of a phoneg...
asked by 23.12.2017 / 15:31
1
answer

Hide and show content when pressing buttons?

I would like to see if you can help me with the following problem that I have, I have 2 buttons which when pressed show different information, but I want that if none are pressed they are hidden and by pressing one or the other the information i...
asked by 06.09.2018 / 14:50
1
answer

Error getting query in node.js

I am making an agenda for myself (without any security). To add, delete or update I use GET to notify the server that I am adding a task. The address would be this:    link Afterwards, to get the query in node.js, I use this code: i...
asked by 04.09.2018 / 22:20
1
answer

Problem saving image order in Database

I have a problem keeping the order of my images in the database, first I have a JS file where I store the new order in a variable, when I open a console.log, if it shows it correctly, then I send that data to an AJAX file that sends it to the co...
asked by 06.09.2018 / 11:25
2
answers

Add each key of an object in an array of arrays, keeping the array format

I have the following information [[{aceptacion: 1, rechazo: 2}, {aceptacion: 0, rechazo: 1}], [{aceptacion: 2, rechazo: 2}, {aceptacion: 0, rechazo: 7}], [{aceptacion: 0, rechazo: 2}, {aceptacion: 0, rechazo: 3}]] and I need the followin...
asked by 06.09.2018 / 14:48