Questions tagged as 'javascript'

3
answers

How to capture the id of an html input with JS

What I want to do is the following: I have an input: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input type="text" id="5" name=""> <input type="button" onclick="x();"&g...
asked by 05.12.2018 / 19:39
2
answers

Use FOR in a fix

I have the following answers. How can I use a for to avoid putting [0], [1], [2] etc. console.log("-------------------------------"); console.log(response.output.generic[0].options[0].label); console.log(response.output.generic[0].options[1].l...
asked by 03.12.2018 / 21:11
2
answers

AngularJS filter by arrangement on property of the object

I'm trying to apply a filter inside an ng-if, but I do not come up with the solution. I have an arrangement of objects of this type: tiempos = [ { id: 39, nombre: "Juan", tiempos: [ {...
asked by 05.10.2018 / 13:27
1
answer

Validate radio button with javascript

I have a form where I have to validate the name, the schedule if it is morning or afternoon and accept the registration rules. With what I have problems, it is the subject of the schedule, I have two radio buttons but I can not validate that...
asked by 27.11.2018 / 10:42
2
answers

Error calling a view with chart.js error Failed to create chart: can not acquire context from the given item

Hello, I need to call mendiante load of jquery a view in Template.php but in the view there is a canvas that contains a graph but the graph shows the following error? '    Failed to create chart: can not acquire context from the given item...
asked by 02.10.2018 / 16:02
3
answers

Add elements from an array

I have the problem that they ask me to do a function cantidadDeMesesConGanancias that I add the positive elements ... I do ... Function cantidadDeMesesConGanancias(meses){ Var sumatoria=0 For(Var i=0;i <meses.length;i++){ If(meses[i]...
asked by 29.09.2018 / 01:47
1
answer

Obtain database records of a text area [closed]

Hello friends I have a problem getting the data of a textarea , if I do not insert line breaks in the field the form gets them without problems (Modal Form) But if I insert line breaks at the time of registration, I no longer I opened the...
asked by 31.12.2015 / 15:17
3
answers

Button not created dynamically

I have this code in a .js file, that when loading the list of clients, in each row of the table there is an edit, a low and a high. As you can see I have a code in the click event but it does not respond with anything: $(document).rea...
asked by 30.10.2018 / 13:51
2
answers

Is it correct to have the ajax script in the same html form?

Hi, I'm new to Ajax and I want to know if the way of working is correct. I have the ajax script in the same html or should I have it in a separate document? <!DOCTYPE html> <html> <head> <title>insertar da...
asked by 04.11.2018 / 00:39
2
answers

Check input with 2 selectors

I need your help. I have the following code: $("input[numero='"+$("#jugada").val()+"']").each(function() { var monto = $(this).attr("monto"); jugado = parseInt(jugado) + parseInt(monto); }) I want to know how to do so in: $("i...
asked by 02.11.2018 / 13:42