Questions tagged as 'javascript'

5
answers

Do not run event when a text box has focus

I have a function so that when you press a key, for example "and", youtube will open (as an event listener of 'keydown') I have a input where I can not write because when I press one of the keys I already have as a shortcut inside the...
asked by 28.10.2017 / 06:38
1
answer

Show bookmark in Google Maps Api Js (Only if you are inside the radio circle)

I need to show markers on a map, only if they are within the radius of the circle shown on the screen. But I do not know how to validate if the marker is or is not inside the radio. var myLatLng = { lat: 14.151171, lng: -90.841083 }; va...
asked by 30.10.2017 / 17:30
1
answer

How to integrate 'swipe' from Hammer.js in Backbone?

Hello! I've been trying all day to make a swipe work with a backbone and I have not had any luck. I have a code that works but it's pretty ugly and from what I've seen it can be structured better. The problem is that when I integrate it into...
asked by 12.11.2017 / 18:37
3
answers

How do I get a number with 1 decimal without rounding in javascript?

I have a problem with decimals, since I'm getting a number for example 2.7607 and I'm taking out 1 decimal with the function toFixed (1) but it returns 2.8 since it rounds it but I need 2.7 only. Someone who can help me please. Thanks !!...
asked by 08.09.2017 / 15:23
4
answers

get value out of click event with jquery

How can I get the document variable out of clcik? obtenerDocu: function() { $('#documentos-table tr').click(function(e) { e.preventDefault(); documento = $(this).closest("tr").find('td:eq(0)').text(); }); re...
asked by 11.09.2017 / 14:04
1
answer

How to separate the text from another

If I create a text in the following way: function urlify(text) { var urlRegex =/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%? =~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; return text.replace(urlRegex, function(url) {...
asked by 28.07.2017 / 01:25
1
answer

How to create a list with indeterminate levels?

More than 1 month ago I asked the following question: How do I create ul and li with a recursive function? and I was solved the problem I had. Currently I need to make a menu with indeterminate levels (the user is the one that will form...
asked by 25.08.2017 / 10:40
1
answer

access functions of a variable in a constructor js

I want to access the variable ctx which is located in the constructor of my game and in the loop function which accesses it to clean the canvas I get the error "main.js: 191 Uncaught TypeError: Can not read property ' clearRect 'of undefined " c...
asked by 10.09.2018 / 22:27
1
answer

Use javascript within PHP

I need to enter a specific password, if it is correct to redirect me to another page. Do I have to add javascript code? <?php $password = "123456"; if ($_POST['password'] != $password) { ?> <h2>Logueate</h2> <form name=...
asked by 13.09.2018 / 10:21
1
answer

Angular error WARNING: sanitizing unsafe style value display: none (see http://g.co/ng/security#xss)

Hi, I'm good at this and I have no idea how to make a form hidden but when you click on a button it shows that div that has display: none, try to set it in the class of .TS by putting the variable visibility display none and when clicking put di...
asked by 11.09.2018 / 09:57