Questions tagged as 'javascript'

4
answers

disable a link

I want to disable this link for a few seconds. <a href="#" data-role="button" data-theme="f" data-rel="popup" id="deshabilitar" type="button" data-icon="cloud-upload" data-iconshadow="true" onclick="deshabilitar()"></a> so that...
asked by 13.09.2017 / 10:15
2
answers

how do I get the values inside an object in javascript

I have the following object, this content by a key KqTiAo1cC0nmASiGr941 in a normal object just say obj.rut and get the rut, but in this case the parent key -KqTiAo1cC0nmASiGr941 is present if I want to get the key I do it...
asked by 02.08.2017 / 21:24
4
answers

redirect page if it is entered from url

That I'm new to this and I need to redirect an html page if you try to enter from the browser, that is if someone tries to enter www.example.com/instructions, not possible but if possible from my homepage , validating an information, I'm trying...
asked by 07.11.2017 / 15:45
2
answers

Show array with hyphen instead of comma

I am showing an array from javascript using the following for : for (var y = 0; y < arrayHay.length; y++) { $(".reporteBody").append('<div class="cajaResult"><h3>Caja #' + arrayHay[y] + "</h3><p>" + arrayM...
asked by 24.02.2018 / 19:20
2
answers

Javascript function to not read blank line breaks

I'm trying to read a txt file with javascript and convert it to JSON, but the files at the end have a blank line break    Example of the TXT file (0, "A": RED, 1) (1, "B": GREEN, 4)  3. This is my function function...
asked by 01.03.2018 / 08:29
2
answers

Event click ignores me the first click

By clicking on the all button, the div content-all would be displayed. Which happens but to the second click. The code works, except that the first click that the user gives (either on the button or outside it) does not generate an...
asked by 10.07.2017 / 14:22
1
answer

Search for most popular values in javascript array

How can I modify this function so that instead of showing me the most popular value, it shows me the 3 most popular values, with popular I refer to the values that are most repeated in the array. Function function mode(array) {...
asked by 31.03.2017 / 17:47
1
answer

Alert in image

I have: <img onclick="exportToFile('WORD')" src="${resource(dir: 'images', file: 'word.png')}" /> <form id="reportForm" action="/test/report1"> ................ </form> <script> function exportToFile(type) { $( "...
asked by 28.04.2017 / 08:35
1
answer

How to eliminate forbidden words that may or may not be surrounded by brackets

I need to eliminate banned words from a text, and also remove brackets (brackets) if they had them before or after. This is the code I tried: window.addEventListener("load", function() { var palabrasProhibidas = ['mala','[mala]...
asked by 05.06.2017 / 22:09
3
answers

Do not send Form by pressing submit button [duplicate]

Dear, I am making a normal form with name, rut and last name. I am sending the form with a button, but when the data is not validated the same form is sent. so my question is.    Is there a javaScript function that stops the button su...
asked by 25.05.2017 / 14:14