Questions tagged as 'javascript'

1
answer

Variable reference to object

In the function for the creation of a google chart in javascript I have the variable of a div on which I draw the graphic. The variable in question is containerDiv, which is a string with the id of the div. I would need, instead of drawing...
asked by 22.06.2016 / 14:09
2
answers

Add a non-existent item to a JSON from js

I've tried with: var data = {}; var file = {file:{name: 'Getter - Blood.mp3', path: '/user1'}}; data.push(file); //Y tambien asi data.file = file; But nothing works, no error or anything, but when you print it on the screen, the new items d...
asked by 23.06.2016 / 17:40
2
answers

Call a php function

Good I have the following doubt I have the following functions PHP in a file, the thing is that I want that by pressing a button (delete) the function is called delete and delete the record. How can you do that without calling a funcio...
asked by 02.11.2018 / 00:44
1
answer

When inserting number in input, update the other two without having to change input

As I said in the question, I am updating some inputs through what I insert in two of them, the quantity and the unit price. Now I am updating well with AJAX, but you need to change the input to actialize, is there any way to write if you update...
asked by 27.10.2018 / 16:30
1
answer

Problems with scrollTop for anchors in HTML

I'm doing a page which when clicking on an option on the menu, it goes to an anchor of it. There's even good. When I use the following code in jquery for scrolling $('nav a').click(function(e){ e.preventDefault(); //...
asked by 26.10.2018 / 20:27
2
answers

How can I upload a file to my server using PHP, AJAX, JAVASCRIPT?

I have problems uploading a file to my server, I CAN NOT read the $ _FILES ['file'] ['name'] after having gone through AJAX, I use the following code: HTML index.php <html> <head> <meta charset="UTF-8"> <scrip...
asked by 26.10.2018 / 05:45
1
answer

Change background color of a div

I am trying to change the background color of a div from javascript through a select in which the client already has the colors defined for each report. function myFunction() { document.getElementById("boxColor").style.backgroundCol...
asked by 25.10.2018 / 03:58
1
answer

How to push data in an empty array every time a function is triggered

I am trying to save a random value in an array every time a user clicks on a button but the value only remains in it at the time of execution of the function. let boton = document.getElementById('boton'); boton.addEventListener("click", inicia...
asked by 25.10.2018 / 12:59
1
answer

Problem showing content dependent on a SELECT in Laravel

I have a table called 'AUTOS' and 'COMPANIES' , respectively, in my database in phpmyadmin. I'm working on < strong> PHP with LARAVEL. I have a function in Javascript which should show me a certain number of records according to the...
asked by 29.10.2018 / 13:51
1
answer

auto increase with ajax

I have a voting system that should autoincrement when clicking on a link, basically the structure is as follows: <ul> <li>Uno <a href="#">0</a></li> <li>Dos <a href="#">0</a></li&g...
asked by 25.10.2018 / 07:00