Questions tagged as 'javascript'

1
answer

Differences between methods and commands in JavaScript

I'm starting to study JavaScript, but in several books and web queries the terms methods and commands appear, but from what I see both use () and perform the same action. For example, this is a command: var name = "Ejemplo"; aler...
asked by 31.12.2015 / 01:59
2
answers

How to capture html attribute in a js variable and then assign it in css variable?

I want to capture the value of src and pass it to a CSS variable, which is in the inline style of the container parent named --img-url . The idea that I have in the html, I have this: <figure class="img-container" style="--i...
asked by 16.01.2018 / 00:01
1
answer

Uncaught TypeError is not a function - Laravel Vue

Inside the template of the Event.vue component I have a select that reads from the wallet table, it is a normal select to choose only one type of wallet (it is not multiselect), for that select I occupy the vue-multiselect component to make a si...
asked by 26.04.2018 / 04:36
1
answer

random code generator javascript

I found this code that generates random alphanumeric codes, I am using it to link 2 types of users, the user can only generate the code once and save it in a table with id and code, then that code is given to other users so that they register it...
asked by 22.03.2018 / 18:04
2
answers

Pass The Container text span id to a PHP Variable

I have a Video Game programmed in HTML and JavaScript from which I wish to pass the points obtained to the MySQL Database and I can not find the correct way to achieve it. JavaScript Code: function updateScore(){ var score = (snakeLengt...
asked by 15.01.2016 / 03:20
1
answer

How to select 'onclick' with random 'id'?

I am extracting data from a web with a series of tables that are loaded with data according to the tab that you select and I can not do the corresponding 'onclick'. The id of the element changes randomly and also the property of the onclick attr...
asked by 19.03.2018 / 16:00
1
answer

Make the circle of Google Maps do not affect a click on the map

I have a Google map where I can put a marker, drag it and with it goes a circle that is the search radius. My problem is that if I click inside the radio it does not call me to the event that makes the marker move to the position of the point...
asked by 21.01.2016 / 00:48
2
answers

returns null in regular expressions

I build a regular expression to locate a piece of text: var re = /Incident:(.*)\tDescriptio/gm; var m; while ((m = re.exec(resultados_texto)) !== null) { if (m.index === re.lastIndex) { re.lastIndex++; } } where result...
asked by 18.01.2016 / 14:37
2
answers

Compare 2 fixes and assign matching value

I have 2 arrangements of objects The first one called data : const data = [ { id: 1, nombre: 'Piero', }, { id: 4, nombre: 'Nelson', }, { id: 7, nombre: 'Diego' }, ] and the second one called subs :...
asked by 11.05.2018 / 21:27
1
answer

Create PDF of Multiple Pages with JSPDF

Hello friends I am trying to create a pdf to print some tickets, I am using boostrap to format html and to create the PDF jspdf and html2pdf The problem is that I want to accommodate 4 tickets on a letter sheet, but my code only generates 1 p...
asked by 10.02.2017 / 15:50