Questions tagged as 'javascript'

2
answers

Replace words with span in contenteditable

I want to replace all the words with span, my code is as follows: let written = ''; document.getElementById('test').addEventListener('keyup', function(e) { var palabra = written; written += String.fromCharCode(e.which); if (e.w...
asked by 09.07.2018 / 18:38
1
answer

How to generate PDFs with Javascript

I have a program in Python that reads a text file (.txt) and with a series of data from the file, generates a PDF with certain information. To read the .txt, use regular expressions. In Javascript there is no problem, I can do it in a similar wa...
asked by 18.12.2015 / 08:55
1
answer

Why does not he bring me the graphic?

Good afternoon I'm doing a graph with js and I already have the graph at the time of showing it is not displayed This is script $(function () { var tope = 100; var acum = 73; $('#container').highcharts({ chart: { type: 'gauge',...
asked by 30.09.2016 / 00:08
1
answer

How can I know from and to where I'm browsing with ngRoute?

I have a template that is displayed temporarily, the problem with this is that it is displayed only if I click on a predefined link. What I want to do is that the temporary template is displayed when accessing the URL with id (/ news /...
asked by 04.09.2016 / 01:59
1
answer

In functions of answers to callbacks, which in turn call another, is it okay to exit with setTimeout?

It's something I usually do; for example, in this hypothetical function function fetchData( url, args, callback, opts ) { var ajax = webix.ajax( ); ... function success( text, data, xhr ) { var response; ... setTimeout(...
asked by 28.09.2017 / 06:55
1
answer

Apply css to a parent element

I have the following code: <div class="togglearea"> <div class="toggle"> <h3>Titulo</h3> </div> </div> <div class="togglearea"> <div class="toggle">Titulo 2</div> </div> I...
asked by 12.01.2017 / 21:45
2
answers

Is it correct to use the same id and name in the input of an html form?

I would like to know if it is a good practice to place the same in id and in name when I am going to program, for example, in HTML and PHP. Could it affect the code when it is already advanced? What consequences could it have to do?     
asked by 19.04.2017 / 02:28
3
answers

Validate a select2 field with jquery-validate

good I have a form in which through a query from php to my bd I charge a select, in which I use the select2 library to be able to search in my registers .. my problem is that when validating this field with jquery-validate This seems to ignore i...
asked by 31.07.2017 / 21:14
1
answer

Perform round-trip binding with 2 objects and knockoutjs

I would like to know if it is possible to make a binding between two objects ( viewmodel ), the first is created as part of the function and the other is created from the Get , and the property that you would like to synchronize betw...
asked by 15.12.2015 / 18:57
3
answers

How to add a value to an input without replacing the one that is already

How can I do when I click on a button to put one number after another and I do not replace the value that is. That is to say if I give two clicks to the 3 I add 33 or if I click on the 1 and then in the 3 I put 13 link function nume...
asked by 22.02.2018 / 01:34