Questions tagged as 'javascript'

0
answers

How to get the value of some combos in my Controller?

I have three combos, which when loading the page combos 2 and 3 are disabled, until you select an option of combo 1 activates 2, and when choosing combo 2, activates 3. What I want is to recover the value of the option that has been chosen an...
asked by 31.08.2018 / 03:12
0
answers

Add and remove active class in navigation menu

I'm working on symfony and I have my navigation menu on the layout page and I would like to know how I can put it active depending on the page I'm on this is the menu                        Start                      <a h...
asked by 07.11.2018 / 16:08
1
answer

Change span color depending on whether the input is empty

$(function(){ $('.contactanos :input') .change(function(){ var $input = $(this); var $span = $('.form__input-focus'); if ($input.val() === '') { $input.css("background-color", "#fff"); $(this).data("span").css("bac...
asked by 08.11.2018 / 15:24
1
answer

Make the code work with a button yes or no

I have this code that makes me send a confirmation message to the user wanting to leave my website, everything works fine. window.addEventListener('beforeunload', function(event) { var confirmationMessage = '¿Seguro que quieres salir?'; e...
asked by 15.08.2018 / 00:17
1
answer

Countdown with DataTables

I have the following problem. I have a function that counts down. At the moment, I have it static, but the value will come from a query to the bd to calculate today's date and compare it with the date to subtract. This is the function: functio...
asked by 15.08.2018 / 01:57
1
answer

Show div while hiding others (jquery)

I want to show some elements by doing click in a botón , but I want that if you are already showing one element and I give click in another botón hide the previous element and show the new one. I did something like...
asked by 14.08.2018 / 16:00
1
answer

how to call JS functions before loading the page

I am developing a web that I have a horizontal menu with a position : fixed , with a JS function that detects the scroll I change the color of the background to the menu so that it can be seen in a readable way, since by default the backgr...
asked by 21.08.2018 / 22:14
3
answers

Add a date in JavaScript within a for

What happens is that I have a code and I want to implement it within a for or something in JavaScript so that for example I have the date 09/15/2018, I add it to 15 days to be something like 09/30/2018, 10/15/2018, 10/30/2018 and so on ......
asked by 22.08.2018 / 16:49
0
answers

How to send a data from a child component to a parent in vue.js?

I have an application in vue.js I need to pass the data "nameComponent" of the following component: <template> <div class="dash"> <fish-row gutter="1"> <fish-col type="fixed" :width="200"><h2>{{nameCom...
asked by 23.08.2018 / 04:01
0
answers

Using Promise with Firebase JavaScript

In this opportunity I call a database in firebase , but to give it a timely and thus be almost sure that the data is loaded I use a promise with a setTimeout as follows; var base = []; var promise = new Prom...
asked by 23.08.2018 / 01:36