Questions tagged as 'javascript'

1
answer

I do an autosum of fields, but it does not show the value in textbox

What can be wrong in my function? $(function() { $('#sumAll').Keydown(function() { var add = 0; $('.cl').each(function() { add += Number($(this).val()); }); $('#sumAll').text(+ add); }); }); <script...
asked by 03.11.2016 / 14:17
1
answer

How to block inputs with js, according to comparisons of dates made in php? Only block the first inputs of the first record

if( ($date >= $fecha_inicioP1) && ($date < $fecha_finP1 ) ) { echo "<br>"; echo "bloquea todos los inputs menos el de primer periodo"; //bloquear inputs de los demas parciales ?> <script type="text/javascript">...
asked by 03.11.2016 / 04:59
1
answer

Loop from X to Y specified by the user

I want to make a cycle that prints the numbers of the range specified by the user, for example: for the values: 2 and 10, it is printed on the div: 2,3,4,5,6,7,8,9, 10. function loopChecking() { 'use strict'; var numberA = document...
asked by 28.11.2017 / 11:06
2
answers

Is it possible that the method of moment format does not work well?

I find myself with the following, I have to format some dates and I always used the moments. Now I have this dilemma: var date2 = new Date(year, 6, 0); var dateEnd = formatShortDate(date2.toString()); and the method formatShortDate ,...
asked by 03.04.2017 / 09:10
1
answer

Assign variable value to css style in javascript

This using javascript to modify some goes some values in the styles, for it I do some calculations, and then I assign that value to the style of the identifier that I want to modify, but it does not show me any type of change . document.getE...
asked by 01.04.2017 / 22:28
2
answers

-webkit-linear-gradient CSS works with few values but does not work with many

I have this line -webkit-linear-gradient(-20deg, #F15A24 87%, transparent 13%); It works well !! But when I try with more values, it does it badly -webkit-linear-gradient(49deg, #575757 52px, #f6f6f6 39px, #092432 429px, #736357 173px,...
asked by 11.10.2016 / 21:43
2
answers

Go through values of a JSON [duplicate]

Through jQuery I am making a call to a select to bring populations from a province and to be able to fill a selection depending on the province chosen. At the moment I get it right, but I can not get the values that the array brings me....
asked by 14.10.2016 / 09:12
1
answer

How are WebSockets used in an html file?

I did this function on an esy.es server: <script> net=new WebSocket("ws://tatopatato.esy.es/chat12.htm") </script> And I get an error:    Firefox can not establish a connection to the server at ws: //tatopatato.esy.es/chat12....
asked by 14.10.2016 / 14:10
4
answers

automatically reload a page by clicking on back in the browser [closed]

Hello, good morning, I want to know if there is a way to make a page automatically reload because I have problems when giving the button back in the browser does not generate new codes, and I must update the page to make it happen     
asked by 11.10.2016 / 13:14
2
answers

Inheritance in javascript with prototypes

I wanted to know what are the differences between prototype and __proto__ , in which cases each one is used, how inheritance works and what good practices would be by creating and using objects in javascript.     
asked by 10.10.2016 / 00:02