Questions tagged as 'javascript'

1
answer

Validate Javascript HTML form

Why would you let me send data if the fields are empty? I should get the alert and not let me continue. function validar_iniciar_sesion_cliente(){ var idemail, password1; idemail = document.getElementById("email").value; passwor...
asked by 27.11.2017 / 10:45
2
answers

Control in loops and if?

I'm putting together a kind of Narrated Role using Javascript. I use a <input id="dialogo" type="text"> to place our answers around the situation that is happening in the "Adventure". I take the data of <input> wh...
asked by 30.11.2017 / 22:26
1
answer

Snowflakes effect with image

With the following HTML I have the snowflake effect with the letter * but I would like to change the asterisk letter to a real image, in icon size. HTML Code: <html> <head> </head> <script> // Numero de copos, rec...
asked by 04.12.2017 / 10:54
2
answers

Extract 4 random Strings from an Array in JavaScript

How could I extract 4 strings randomly from an array, for example this var myArray = ["Rufles Original", "Aceitunas", "Lays al punto de sal", "Doritos TexMex", "Nachos", "Aceituna maceradas", "Rufles Jamon Jamon", "Cerveza", "Coca-...
asked by 07.09.2016 / 13:16
1
answer

How to know with JavaScript which address is scrolled?

How was the address scroll on the page? I want that when you scroll down, you do an action and another action when you scroll up.     
asked by 05.09.2016 / 23:03
2
answers

How to generate a condition in javascript to deny access to a function?

Well, I am trying to create a condition where if a select element is empty, deny the call to a function made in ajax, but my problem is that I do not know exactly how to create that condition. Here is my code attempt. function LimpiaEstado() {...
asked by 08.09.2016 / 02:07
3
answers

Compare the first character of the text

I have a code, that if a function is given as a parameter the string: #elemento You will use a document.getElementById(); and if you receive the string of the form: .elemento You will use a getElementsByClassName();...
asked by 05.10.2017 / 02:23
1
answer

Data table with AJAX C # ASP.NET SqlDataReader

Hi, I'm working with ASP.Net / SqlDataReader / C # and razor I have the sig. complication ... I'm trying to show a table using AJAX but I'm not sure I'm doing it right, so I understand I have to make a method for my query to be stored in a list...
asked by 03.10.2017 / 23:17
2
answers

Stop a setInterval () in JavaScript

I am developing a number increase with setInterval (), and I want the setInterval to stop when the counter reaches a certain number. var cont = 0; var rango = document.getElementById('rango'); var id = setInterval(function(){ rang...
asked by 07.10.2017 / 00:22
1
answer

JS - alternative to return false?

More than a question, it's a question that I want to read from those of you who have been bumping heads with this for a long time. I am in JavaScript, I am doing a form validator and I see myself in the situation that I want to cut completely...
asked by 01.09.2017 / 13:48