Questions tagged as 'javascript'

1
answer

Regex for split () in javascript

I'm trying to make a pattern that separates a text if it finds one of the following characters: +, -, x, /,. I tried with the following code but it does not work, could someone help me? var texto = "Hol+A q-ue txal e/st.as"; var separa...
asked by 25.10.2018 / 13:06
2
answers

Different result when using parseFloat [duplicate]

I just need to take two decimals of a number with the toFixed (2) method and for that I have to convert the numbers to parseFloat because otherwise the toFixed method fails me. The problem is that they give me wrong numbers and I do not know w...
asked by 20.09.2018 / 12:37
2
answers

How to eliminate whitespace in a string?

How can I eliminate whitespace in a string? How can I put all the characters together and eliminate those spaces? var incognita = "Hola como estas";     
asked by 18.05.2018 / 18:08
2
answers

Separate json to use it in javascript

I have this output of json what I want to know is how to separate each object - ie: (3,2,5 etc.) in variables to use those variables in a javascript . Example: { "procede": "1", "status": "1", "statusText": "Corre...
asked by 17.10.2018 / 23:51
2
answers

Substitute one image for another - Events - Javascript - HTML

I have a set of images stored in an array and I show them through the array with a "foreach". PHP Code of how I extract the images and show them: $imagenes = $cabana->getImagenes(); //Recorremos el foreach del array "$imagenes". $first...
asked by 17.11.2017 / 12:40
2
answers

Access the id attribute of an element selected by its class in js

my problem is next ... I want to access the ID attribute of an element but selecting it by its class, that is .. this is the element. <div class="capaClickeable" id="1"></div> select it with getElementsByClassName because the...
asked by 22.09.2017 / 23:03
1
answer

Know the position of an element with respect to the scroll [duplicated]

How can I know when the position of an element is scrolled with respect to the position of the scroll? This is what I have tried so far: const elements = []; for(i = 0; i <= 8; i++) { elements.push(document.getElementById('p...
asked by 19.07.2017 / 20:44
2
answers

Show Pop Up of an image

My question in itself is how to make an image appear every time an html page is loaded, attached code and example image: <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <b...
asked by 31.07.2017 / 16:46
6
answers

Put a certain amount of zeros with jQuery

Hi, I have a small problem: I have my table in my BD called numeracion , in which is the field numeracion in it I have the numbers of the tickets or invoices; id_numercion numeracion id_estado ---------- ------...
asked by 12.07.2017 / 22:48
3
answers

Total sum of a column

I have this column of a table in html which I need to do a total sum and the result insert it a input text type td(class='sumTtotal') This is my td where each result of the dif $ remains What I was trying to do i...
asked by 26.07.2017 / 16:11