Questions tagged as 'javascript'

2
answers

Perform a split with javascript

I'm doing a method in javascript which given an absolute url makes it relative. For this I am trying to make a split so that the url given the cut by \ I searched the internet and I am not able to find anything that works. H...
asked by 29.05.2016 / 19:16
1
answer

Calculate expiration date with JS

I want to do a calculation in which I show in input how many days are missing so that an insurance expires, an important point is that I do not have field in the DB to save this information, I show the data in a table by half of a whil...
asked by 02.01.2018 / 17:25
3
answers

Date object why does it show one more day?

I know that the month starts counting from scratch, that's why one more month comes out and I have to take one from him. But because the day shows one less? var fecha = new Date(1989, 10, 10); //1989-11-09T23:00:00.000Z     
asked by 29.12.2017 / 15:03
2
answers

How to show dates between a range of dates given with JAVASCRIPT?

good afternoon. My question is the following as I can do to show the dates between 2 dates given by the user only with JavaScript or Jquery, since the information I am getting from an API I only take care of the Frontend and I do not have acc...
asked by 28.12.2017 / 21:02
2
answers

How to discard an empty array in a function?

Hello everyone I am working with native js, in this function I return the product of the elements in the array, what I can not achieve is to discard the case of an empty array, it always shows me the 1, but if it resulted in change the value to...
asked by 29.12.2017 / 09:41
3
answers

How to list start and end dates of a specific week

What is desired is the following, a function that receives as a parameter, the week number of a specific year and returns the date on which it starts and ends that week. for example function weekStartEnd($weekNumber,$year){ $firstDateOfWeek=...
asked by 29.12.2017 / 00:14
3
answers

How to send a data to javascript from php?

It turns out that I'm trying to pass a value of PHP to Javascript to validate me if there is already a certain amount of data. The PHP script does its job if the data exists returns 1 and if it does not return 0...
asked by 29.12.2017 / 17:20
2
answers

Problem with sending data by ajax (laravel)

I am sending a data by ajax with type: 'post', but it generates an error, when I change it to type: 'get', the data is received in success. This is the code. Ajax $('.QuestionList-item').on('click', function() { $('.Question').sho...
asked by 07.05.2016 / 18:00
1
answer

how to control the execution of javascript

I'm programming in javascript (I'm new) and I've noticed that sometimes it does not run sequentially, I've seen that it's because it runs asynchronously. So far I have half escaped with the setTimeout function, but I would like to know if the...
asked by 01.01.2019 / 14:23
2
answers

How to use several onload in the same html file

Let's see if someone can help me. I want to use in a file html several different scripts in vanilla javascript and I find the problem of using the functions when the document is loaded with the instruction: document.onload = f...
asked by 01.03.2017 / 14:38