Questions tagged as 'javascript'

2
answers

Ajax always within .html in the script tag?

I have been studying ajax, in different videos from youtube and in different pages, now my question is always the script in which ajax is going to be in the .html I always see it there, and for example I tried to pass it to another side like a ....
asked by 28.02.2018 / 16:50
1
answer

Play audio in JQuery

In my HTML I have the following (in addition to the "display: none" in the css): <audio class="audio"> <source src="~/Audios/NUMEROS/ONE.ogg" type="audio/ogg"> </audio> And to execute said Audio, I put the following co...
asked by 27.05.2018 / 15:48
2
answers

Replace data in an array

I have this arrangement var autos= [{ "Modelo": "Mazda", "Referencia": "Mazda 6", "Precio": 73710 }]; and I have a variable var precioDescuento = 6120 What I'm trying to do is replace the price of 73710 with 6120 I w...
asked by 19.12.2017 / 13:05
2
answers

Change the url of css with delay

I would like that when the url change I do it with a lighter effect not very strong my code imagenes = ["fondo1.jpg", "fondo2.jpg", "fondo3.jpg"]; function cambiarFondo() { document.body.style.backgroundImage = "url(assets/i...
asked by 27.12.2017 / 14:23
1
answer

JavaScript Array Format

PROBLEM I have a problem returning the results of a query, since I need to sort the results of a query in a single array in JavaScript, and not a array with its objects, each object being a different array. CODE $scope....
asked by 19.02.2018 / 20:50
2
answers

Send local variables to Ajax

I have a cycle for and inside a call ajax . In success I use a variable that is "processed" with the cycle and is different for each call in the ajax. The problem is that the success does not seem to be taking the corr...
asked by 21.12.2017 / 23:27
2
answers

I want to take the data of each label?

I want to click on each button of each div generated I take the data in which they are, the price and the name, but when the page is generated, all the buttons return the information of the first <div> generated for the fo...
asked by 28.11.2017 / 13:12
3
answers

An Alert appears for each detected keyup

I would like to know how I do to avoid generating an alert for each value entered in an input field with the keyup event, I only wish that the alert be executed once if the validation fails, but with this code if in the input I press x number of...
asked by 23.11.2017 / 05:23
3
answers

Remove HTML5 DIV item content

What is the correct way to remove the content of an element <div id="root"></div> of HTML 5 if this element contains other elements <div></div> , I have tried these two options and both work, but I would like...
asked by 23.11.2017 / 14:44
1
answer

jQuery - show () hide ()

I have a button called "new" ... <input type="submit" style="width:200px; height:28px;" name="nueva" id="nueva" value="Añadir"> I want to select or click, open a form / div to fill in some data. <form action="<?php echo $_SERV...
asked by 29.11.2017 / 11:17