Questions tagged as 'javascript'

2
answers

How to add inputs dynamically and that the result appears in other input?

Greetings, I'm looking for a way to add the amount of an input, so many times I tell you in another input. The problem arises that I must take 20% of that amount and add it when I have previously added the amount of the input 3 times. Give an ex...
asked by 13.08.2017 / 19:42
2
answers

You can change the style of an Alert window [duplicated]

can you change the style of an alert () that is, some function to do it or it always has to be the same way?     
asked by 22.08.2017 / 17:44
1
answer

Save Javascript variable in PHP

I have a variable in JavaScript that I can send to value of a form in html. The input where the variable is loaded is like hidden because I do not want it to display the value on the screen. The form only has that input...
asked by 22.10.2018 / 20:20
1
answer

Use data from the Vue instance in the Vue Router template

How to use data from the Vue instance in the templates of Vue Router routes. This is my code HTML <div id="app"> <router-link to="/foo/1">ruta 1</router-link> <router-link to="/foo/2">ruta 2</r...
asked by 19.08.2018 / 06:02
4
answers

How to consume an API with REACTJS?

I have an application created with reactjs which I must consume an api that returns me x data. The problem I have is that I do not know how to do it through reactjs, I've reviewed the Internet how to do it and I've replicated exactly the...
asked by 05.12.2018 / 14:13
1
answer

option element of a select selected by default

I have a select with a single fixed option disabled, the other options are added after an ajax query, I need to load the page to select the fixed option with the disable. <select id="desdeReserveInput" name="desde" class="form-control">...
asked by 28.11.2018 / 17:27
1
answer

Javascript only runs in the first element of the table

I'm new to JavaScript and I have the following problem: <tr th:each="planificacion : ${planificaciones}" th:onclick="'window.location.href = \'' + @{/planificacion/{idp}(idp=${planificacion.id})}+ '\''"> <td th:text="${pl...
asked by 18.12.2018 / 17:10
2
answers

Convert URL to Object (JavaScript)

I am working on a personal project (using node.js) where I need to get the route of the GET request, for example "/path/to/content" , transform it into an Object and make it look like this: { "path": { "to": { "content":[...
asked by 27.12.2018 / 17:49
1
answer

Retrieve a hidden value in html

I have a hidden attribute, which I put through a java method: <input type="hidden" id="url" th:value="${url}" /> And I want to put an input of type text whose value will be the value that is in the hidden "url" <input type...
asked by 14.04.2016 / 12:12
1
answer

Display Image on the same window with Javascript

As I describe in the title, what I try to do is that when you click on the icon of an image or a button you can display it on the same screen, just like in gmail it is done when you open a png or jpg and that when you click closes this. I do...
asked by 15.09.2018 / 00:28