Questions tagged as 'javascript'

1
answer

How to know which user is logged in with ajax requests? [closed]

I have a problem with my ajax functions, I made a simple login with a request get to a REST server asking for the data of userName, password and id and I compare it with the entered data userName and password and if it matches one it redirects m...
asked by 04.04.2018 / 07:33
2
answers

Edit values of a JSON object inside a Javascript array

I have a array of this type my array = [{N:23/*editar el numero 23*/, k:5},{N:11, k:10},{N:89, k:66}] And I want to change the number 23 to another number without affecting the rest of the object "k: 5" I do not know what method o...
asked by 04.04.2018 / 13:24
1
answer

How to create a function that says whether or not the answers to a questionnaire are correct?

I'm trying to do a questionnaire like this I create an array that contains the objects of my questionnaire inside var cuestionario = [{ pregunta: 'pregunta1', opciones: { a: 'opcionA1', b: 'opcionB1', c: 'opcio...
asked by 12.03.2018 / 00:52
1
answer

Uncaught TypeError: $ (...) .appendTo is not a function

I have this element: <p class="info" style="text-align: left;">Encuentra toda la info aquí</p> And I want to move it to this div ; <div id="informacion"></div> I have tried in the following ways: $('.in...
asked by 12.03.2018 / 15:12
2
answers

Show table in HTML with Ajax and Json

I have the following JSON object and would like to show it in an HTML table: { "data":[ { "0":"328", "tr_id":"328", "1":"USE", "tr_oficina":"USE", "2":"4", "num_ofic...
asked by 11.03.2018 / 01:45
2
answers

Get data from a form and store it in variables

I'm making a form that collects data and then stores it in variables to make operations with them, but when you store them in an array and then try to pick them up they get lost somewhere or they do not get picked up with the function that calls...
asked by 11.03.2018 / 14:00
2
answers

Screenshot with canvas

I am trying to capture a screen with canvas, I can capture it, but I want to capture a specific div in a form, since I do not want to capture the whole web. How could I do it? <script> function getScreen() {...
asked by 02.02.2018 / 10:01
1
answer

Time it takes to load a table with Datatables

I was doing tests with a table with 2,000 records and datatables worked fine, now I change it with another one that has 16,000 records and after 7 seconds gives error. In the debugger I see that the select became complete (the 16,000 records)...
asked by 06.02.2018 / 17:04
1
answer

Problems with JavaScript to show the values of an object

In the following example you can find a Json with previously established information. The problem is that the identifiers are numeric. How can I extract the textual information? Example Hola mundo . var col = []; var mydata =...
asked by 28.01.2018 / 16:21
1
answer

How do I know in which text field the cursor is located?

I am using angularjs and I need to know in which text field the cursor is located ?, I have a problem, it is that I create a keyboard on the screen and it writes depending on the text field where the cursor is since there are more than three tex...
asked by 04.02.2018 / 06:48