Questions tagged as 'javascript'

2
answers

Problem with selectable datatable rows

Good morning. I have a problem when it comes to obtaining the value of the selected rows of a datatable. I need to be able to select all the rows that I want (this is already working for me) and by pressing a button that shows me the value of...
asked by 15.01.2018 / 09:40
2
answers

Filter array of objects in Javascript

I have the following array of friends: friends = [ {id: 1, name: "uSUARIO2", username: "usuario1"}, {id: 2, name: "uSUARIO2", username: "usuario1"}, {id: 3, name: "uSUARIO3", username: "usuario1"}, {id: 4, name: "uSUARIO4", username: "...
asked by 31.01.2018 / 00:12
1
answer

Is it necessary to initialize an object in angular?

I have an external class export class as template for an object. export class Car{ name: Boolean; other: { prize: String; brand: String; }; doors: { number: String, size: String, }; } I try to access it from...
asked by 16.01.2018 / 12:42
1
answer

Insert JavaScript variable to a Form action. with pug / jade

I need to insert the value of a javascript variable at action of a form The Script is this: var url = window.location; var urlcomplete = url.href; var urlparts = urlcomplete.split("/"); var years = urlparts[urlparts.l...
asked by 02.02.2018 / 16:57
2
answers

Detect page change or reload

How can I detect a page change or reload so that I can show a confirmation alert if I want to leave the current page or not. var res = confirm('It\'s time to change. Do you agree with me?'); if (res) { event.target.nextElementSibling.tex...
asked by 02.02.2018 / 16:54
1
answer

problem with frisking this

Good I am the following code that I have taken it from this page this particular example: var myApp = function(){ var that = this; var name = "World"; var sayHello = function(){ console.log( 'Hello, ' + that.name );...
asked by 02.02.2018 / 18:20
1
answer

Problems with styles when repeating input number in bootstrap 4

Hello, I am having problems with an input form of numbers, it turns out that when I repeat the whole div, it only takes style to only one. (function ( $ ) { $.fn.bootstrapNumber = function( options ) { var settings = $.extend({...
asked by 14.06.2018 / 15:05
2
answers

Javascript Structure For

This sequence does not give the expected results. The result of "n" should be 512 and not 2 as given as written. var n=1; for (var t1=0;t1<3;t1++){ for (var t2=0;t2<3;t2++){ for (var t3=0;t3<3;t3++){ for (va...
asked by 11.06.2018 / 15:56
2
answers

ForEach javascript

Good, I am trying to set the forEach method for the Array class in javascript, to use it in a function that adds each element to a string. The object is a NodeofList, but I can not do it: NodeofList<Element>.forEach=funcion(){}; T...
asked by 13.01.2018 / 01:10
1
answer

Problem JQuery get input value

I have the following code: //Validar usuario existente con ajax //Pedimos el valor del campo usuario para verificar si existe y enviarlo al controlador //revise en la base de datos que esta palabra no exista var usuarioExistente = fal...
asked by 08.05.2018 / 18:40