Questions tagged as 'javascript'

2
answers

Cause a .change () to fire when 2 inputs were modified

The problem I have is that I want an update to be made when I modify two fields of the text box type for it. I have a function that takes both IDs and when I detect the change, call a function: $(document).ready(function miFuncion() { let...
asked by 04.04.2018 / 00:46
2
answers

Generate TreeView with Json

I'm generating a TreeView with a Json, the library I'm using is bootstrap-treeview.js. The structure of the Json that I receive is the following: data = [{ "Nivel": 0, "NombrePuesto": "Coordinador" }, { "Nivel": 1, "Nom...
asked by 05.04.2018 / 01:08
1
answer

How to center the crosses in the box?

Hi, I have a problem in the html file, I'm trying to adapt a code that I found in Google of a game, all three in a row. The problem is that I change the original size and when it comes to centering the "X" I do not get it for laps I give it. The...
asked by 10.04.2018 / 13:09
1
answer

Javascript: The check 2 12 returns true

In a part of my code I have to check if a number entered by the user is greater than a maximum. I have this written: console.log("mod: "+ mod); console.log("max_mod: "+ max_mod); console.log("mod > max_mod: "+ (mod > max_mod)...
asked by 29.05.2018 / 10:11
2
answers

Ask before reloading / changing page

I mean confirm if you are sure to leave the current page I have a form, and I want to ask if the form has a filled field if you are sure to reload / exit the page I'm currently using window.onbeforeunload = function(e) { return "You...
asked by 14.03.2018 / 16:06
1
answer

JQuery code to pure JS

Good day yesterday I asked a question to which I responded successfully, only that when implementing it in my project, I worked with custom templates of Blogger I wanted to add the JQuery code and it does not detect the function. $('.custom-pl...
asked by 24.03.2018 / 20:32
2
answers

how to use attributes within a javascript function

I have a javascript function to which I pass a parameter, and within that function I want to modify an attribute of that parameter, but I do not get it. My code is as follows: This is the code from which I call my function (which is a dialog...
asked by 11.04.2016 / 11:45
3
answers

Problem sending form with AJAX

The "success" of the AJAX submission function works, but the "url" does not do its function of executing the code. Just check if the directory exists and then go to "success"; If in the "url" I put a false directory it does not go to "success"....
asked by 03.06.2016 / 08:26
1
answer

What are debounce and throttle in JavaScript?

I have seen that they are methods that are usually done by those who write JavaScript for help or for a specific purpose but I am not sure what each one does.     
asked by 07.02.2017 / 05:14
2
answers

redirect html page when trying to enter from the browser

I need to avoid entering an html address, that is, if someone tries to enter from the browser, it directs it to the main page. On the other hand, it is only possible to access from the main page. I would like to do it from htaccess, my js is...
asked by 03.11.2017 / 17:24