Hello! I have this code, yes, I make many errors in the code, I'm new using AJAX and Javascript .
var turno_actual = 0;
function desplegarAlerta() {
$(document).ready(function() {
var refreshId = setInterval(function() {
$('#tu...
I'm trying to understand the basics to have solid foundations.
At the moment I'm doing an exercise to recover some fictitious tweets. I am making an effort to understand well the reason of all the development of the loop and I have something...
I have a series of labels in my view JSP . Each label shows a unit of measure and if you want to edit it, it is replaced via javascript with a input via button.
NOTE: both the labels and the input are elements wit...
I have an empty object defined (associative array)
obj = {}
If I try to consult some parameter this will return undefined to me because it is empty.
>> console.log(obj.id)
undefined
now I assign a value to id
>> obj.id...
I'm trying to reuse ajax to make it more mobile in my project.
Put it in the following way waiting for an answer but no.
function _ajax(params,uri,type){
$.ajax({
url: uri,
type: type,
dataType: 'json',...
In several responses on this site I have read contradictory statements about whether everything in JavaScript is an object or not.
What is the truth?
The idea is that the answers are based on reliable sources, preferably in the ECMAScript...
I am migrating an application to angular, but I got a bit involved with the routes, especially with the sub-routes, which I have the following problems and doubts:
Structure of my application
The passage of the index to the loading i...
The following code works and has 4 conditions but I want to simplify it since they are really 150 conditions, is there any other way to reduce this algorithm and not 150 else if?
for (var j = 0; j < $scope.cants.length; j++) {
if ($scope....
My question is how to define private methods in javascript classes so that they can not be accessed directly.
class User {
constructor(name, password, email) {
this.name = name;
this.password = password;
this.email = e...
The idea is that if I have two HTML pages I can join them, and I can call their methods and the DOM between both pages, without using a controller like PHP
Example:
pagina1.html
<!DOCTYPE html>
<html>
<head>...