Questions tagged as 'javascript'

1
answer

Fill an input depending on the value of another

I have the following html form which has a readonly "Base Price" field and I want to fill it with a value that will depend on the data that the other inputs have and then validate it with Javascript and Java (JSP, Servlets) to save them in a dat...
asked by 04.11.2017 / 14:08
1
answer

Problem when calling a 3rd html file with ajax and Jquery

I'm trying to call a second file, from another file loaded with ajax + Jquery The main file contains a button, which is listening for an event, that will load the container of an HTML file. The code of the main file is the following: <di...
asked by 04.11.2017 / 01:47
1
answer

Problem: "Function in ngFor runs multiple times without stopping"

HTML: <input #inputCodigo type="text" (keyup)="searchProductoBarCode($event)"> </div> </article> <article *ngIf="proforma && proforma.productos.length"> <table #tableDispatch tabindex="-1" [attr.role]="...
asked by 15.01.2018 / 20:20
2
answers

Referencing a javascript file in another

I have an html file that contains a button, which when pressed calls a function "newBiblioteca ()" which is responsible for creating a library-type object. The problem is that when you click on the button the browser does not do anything. And se...
asked by 04.11.2017 / 14:06
1
answer

How to pass data with json

I need to pass from PHP a JSON to each field that corresponds the value, for the moment I try with the value of select and you are supposed to put it in the cedula field. I attach the code $(document).ready(function(...
asked by 14.01.2018 / 23:03
1
answer

Problem copying to clipboard with clipboard.js [duplicated]

I'm trying to copy the contents of a cell in a table using a button with JavaScript and the library clipboard.js Each cell has a different value and that value arrives with PHP at foreach and is displayed with $item->res...
asked by 16.01.2018 / 09:14
1
answer

setInterval () with variable times

I'm trying to synchronize an animation with the background music. For this I am using the setInterval () function of javascript. What is the problem that I face is that this function has a fixed parameter (time). I need to run the animat...
asked by 27.10.2017 / 21:43
1
answer

Google maps with search engine on my site and with only one destination?

I would like to put on a website that I am developing a section that is "how to get there" which has a search engine, in which I would only search for the origin and the destination would always be the same. What I do not know is if there is a l...
asked by 25.10.2017 / 18:59
2
answers

Alert is not displayed when I show it before a redirect

I want to show a message with the error generated by a sentence in my BD and then redirect to another page, the code is as follows: echo '<script language="javascript">alert("Error al Grabar Cheque:'.$arr[2].'");</script>'; sleep(5...
asked by 25.10.2017 / 18:48
2
answers

Create new elements to DOM JS vs Jquery

I am trying to optimize a code that is written in Javascript and other parts in Jquery. The question is simple, what is more efficient to create elements? $(function(){ //OPCION 1 $('#myDiv').append('<button id="myBtn">J...
asked by 06.11.2017 / 15:42