Questions tagged as 'javascript'

1
answer

Type error not detected: the 'length' property of null can not be read (Uncaught TypeError: Can not read property 'length' of null)

function addRowDT(data) { var tabla = $("#tbl_pacientes").DataTable(); for (var i = 0; i < data.length; i++) { tabla.fnAddData([ data[i].IdPaciente, data[i].Nombres, (data[i].ApPa...
asked by 27.12.2018 / 00:53
1
answer

How do I get this random game to work properly with Javascript? [closed]

I'm just learning javascript and to practice I had the idea of doing an English / Spanish game. The game basically consists in that in the title a Colombian idiom appears and below in some pictures some definitions that could be of that i...
asked by 26.12.2018 / 20:16
1
answer

how to count time while writing in an input text?

Good, I have this code var timer =null; function interval(){ if (timer != null) { clearInterval(timer) timer = null } let elem = document.getElementById("segundos"); elem.t...
asked by 26.12.2018 / 18:11
1
answer

How to ask before closing a window

Hello everyone, I have a window that is created from javascript and I would like you to ask the client for a confirmation to close when I close, I have tried this: var xwin = window.open("/PatientForms/RenderDinamicHtml", "", "width=800, h...
asked by 02.01.2019 / 21:16
1
answer

Javascript problem

I want to build a table in javascript using two arrays one for the months and another for the days of each month. I want to show a row with the months and below a row with the days. Start as follows: <script type="text/javascript">...
asked by 21.12.2018 / 01:23
1
answer

Problem with javascript timer when I minimize the browser window

This is my code to create a stopwatch, it works fine, the only problem that presents me is that when I minimize the browser (any browser), the chronometer does not keep counting time. If I re-maximize the browser again, count the time. <...
asked by 13.12.2018 / 17:17
1
answer

Activate file submit with another button

$(".btn-logo-img").click(function(){ var subir_btn = document.getElementById("logo"); subir_btn.click(); }); .logo is an input of type file, as it looks very ugly I created the .btn-logo-img of type button, when pressing th...
asked by 14.12.2018 / 08:45
1
answer

create a circular input type range

I'm trying to make a range type input that is circular, similar to this: but the only thing I find are circular progress bars, and I need an input range that is circular and that you can change the value, and give it a minimum value and a...
asked by 14.12.2018 / 20:21
1
answer

limit numbers and commas x jquery

I have an input text, where I would like to limit the characters entered by the user to "only numbers and commas", that is: Ej1: "1001,1002,1003" Ej2: "1001" Ej3: "1001,2002" How could I do it in jquery? I copy fragment of the code:...
asked by 13.12.2018 / 18:25
1
answer

Using RegExp in JavaScript to simulate a wildcard search

Good day, I have a problem, I'm working with JavaScript, I have a function that runs through an array, but I need you to find matches within the array, for example, in the text "Carlos Daniel Zárate Ramírez" find "Carlos Zarate", which imitate t...
asked by 14.12.2018 / 16:13