Questions tagged as 'javascript'

2
answers

+ = does not work for me inside a Loop for of

I'm doing an ATM Javascript exercise and it works well, but I thought about improving it by validating the amount of money requested against the amount of money available in the ATM, so I did a "for of" cycle to get the sum available like this:...
asked by 08.06.2017 / 23:51
3
answers

Load an array in select - Javascript

I have a form in a document HTML with a field select where I charge several provinces. Is this way to load the provinces in the Select correct? I get an error. <select name="provincia" id="provincia"> <option value="...
asked by 14.05.2017 / 17:22
3
answers

How to get JSON data an external website?

I want to get the value of a JSON that I send from another external web example: I'm sending this from the other website text.php <?php echo json_encode(array("texto"=>"ejemplo")); ?> {"texto":"ejemplo"} And now...
asked by 15.03.2017 / 03:27
1
answer

Nodejs: Can not set headers after they are sent

Good I have an error in Node that I do not understand because it happens: class HomeController { getViewLogin(req, res, next) { if(req.isAuthenticated()) res.redirect('/index'); res.render('singIn', { title: 'Login'...
asked by 13.03.2017 / 17:26
2
answers

Call to dynamic Javascript variable

How about. My question is this: I create a variable in javascript within an each: window["opcion" + v.id] = {var1: 1, var2: 2}; If I want to access it within it each, how should I refer to it? It could be like this: "opcion"+v.id...
asked by 15.12.2017 / 15:37
1
answer

Include html code in javascript

I am working on an ASP.NET MVC app, in which in the Front cargo a datatable.net by means of a JSON the problem is that in each row I have to add the icon to edit and delete. The code I occupy is the following: HTML and JavaScript &...
asked by 15.12.2017 / 03:06
1
answer

Run script from several elements with the same name

Good trades I have several elements <img class="img-producto"> and a javascript function in which I search with the events 'mouseover' and 'mouseout' is that when passing through the images that are in <img class...
asked by 20.12.2017 / 20:27
4
answers

How to make a personalized error message?

I want to make a custom error message, but not using the alert of Javascript , but the API of form validation. Hoping that when the person does not fill input a cloud comes out asking to fill the element in question...
asked by 22.12.2017 / 14:33
1
answer

Problems with calling an external function within another

Hi, I am doing the classic example of a calculator but I have problems processing a function within the function of the equal button (=). Any suggestions? var nunArray = []; var newArray = []; var operation = false; var suma = false; function...
asked by 27.12.2017 / 16:59
2
answers

Simple question of! NOT because it does not return what I think

Focusing on this part = > Number (! username) Because it does not return 'Please enter some value. and if it works with ! Number (userName) I do not understand well At all, when I put 0 in the prompt it is a zero string, which is by defa...
asked by 14.12.2017 / 00:17