Questions tagged as 'javascript'

1
answer

Problem with return Javascript

I have always had little clarity on how to 'pick up' or 'capture' the value of the return, I know it is with functional expressions, but how? My attempt: var calc = document.getElementById('gosqrt'); calc.addEventListener("click", ma...
asked by 13.06.2017 / 02:16
1
answer

Requiring a file makes ajax not work

At the moment I am doing a dynamic table with ajax and everything works fine .. until I enter a label <?php require("nav.php"); ?> in a div, this file is a generic menu; Suddenly the error appears in the firefox console: TypeErro...
asked by 27.06.2017 / 15:18
1
answer

Forum limit of votes by post PHP

Hi, I'm trying to make a forum in which registered users can write comments and assess, the problem is that a registered user can rate as many times as they want and I would like the user to rate 1 time per comment. The page is link The...
asked by 12.06.2017 / 15:18
1
answer

Prevent browser from using cache with ajax

Good morning, I have the following code which verifies me through ajax to a file called ultima_cuenta.php that makes a query and returns the last id of a table called accounts, this code is executed once the password is opened. page and it works...
asked by 26.03.2018 / 04:18
1
answer

stop javascript word generator

I'm doing a game where the user has to put in the input the random words that appear above in the box, everything goes well and works until it reaches level 5, when finished putting the words of that level should happen to the function win () an...
asked by 25.03.2018 / 17:36
2
answers

How can I avoid accessing a web page by URL without having logged in, using only Javascript?

Good morning, I'm making a website that asks to login, and after this, it is redirected to another page if the user exists. This is done through Javascript queries to an API, where the user and password are searched and if it is correct, it take...
asked by 20.06.2017 / 10:36
1
answer

Import and Export JS

Before anything a taste, my name is Brian and I am from Argentina. It's the first time I ask on this site, I really did not know him and he seems to be very good haha. I tell you ... I have a small project of a game in JS that is based on tur...
asked by 08.06.2017 / 00:02
3
answers

Use Smarty variables in JavaScript with innerHTML

I have Smarty variable (PrestaShop) {$cart_qties} . How can I use it in a script? For example <script> if ("{$cart_qties}" > 5) { document.getElementById("demo").innerHTML = "MAS de 5"; } </script> <p id="demo"&...
asked by 08.06.2017 / 10:52
2
answers

inst.setState.bind is not a function, problems with State in react

I am simply trying to change a state by means of handlers in react but when executing the functions the state does not change. Here I have the functions, the state and the objects where I send the props It should be noted that I use webpac...
asked by 08.06.2017 / 04:33
1
answer

Problems with a table

Good morning. I am making a table where rows are added and these can be edited. I had a previous problem which was that I only edited the header, and I fixed that problem but another one was generated: I only edit the first row but the second...
asked by 20.07.2017 / 15:36