Questions tagged as 'javascript'

1
answer

Calculate difference between dates in JavaScript

I'm learning Javascript and I'm making a retirement calculator. I would like to know how to get the two dates entered in the html form and calculate the difference between them and give the difference as output. I have the following html &l...
asked by 02.04.2016 / 18:35
2
answers

Position of DIV relative to another with dynamic content

I have two divs on my page, one class="rodape" and another class="content" . The first is the footer of the page, and adjusts its position relative to bottom of the fixed contents of the page without problems. Ho...
asked by 08.01.2016 / 16:00
1
answer

Socket.io: module can not be found

I was playing with Socket.io, everything working fine, when I gave the command node app.js from one time to another NodeJS returns me an error (it was working before)    Can not find module 'socket.io' I looked for another example...
asked by 07.01.2016 / 16:33
1
answer

Pass Javascript result to a field [closed]

In this script my down script is not passing the results to the fields anyway no one would have a light how can I solve this $(window).load(function(){ var contador = function() { var n = $("input:enabled:checked").length; var unchecked = 0;...
asked by 07.01.2016 / 00:47
1
answer

How to return object relative object?

I need to return a previous object from an object, this is because I am using this on function for tests. See: NodeList.prototype.style={ set background(a){ DefStyle("background",a,this)//aqui },set backgroundColor(a)...
asked by 14.01.2016 / 02:22
1
answer

Fomulário inside form php / ajax / js

At first glance, the title already shows the error, but this is the process I need but I have no idea how to do it. Given a simple form for example: <form method="post" action="trata_form.php"> <input type="text" placehold...
asked by 22.08.2016 / 22:32
1
answer

Request Problems using superagent

I'm trying to request using the library superagent on my server nodejs , I'm following the documentation, however, is not working. Here's my code nodejs : var express = require('express'); var app = express(); var request...
asked by 08.01.2016 / 19:56
1
answer

Reload content while giving Submit

I need to load all the content defined in the database query every while and fill in the fields and give the submit, it will write to the bank and reload only that loop bringing me the filled bank data again. So when you are posting information...
asked by 25.08.2016 / 13:30
1
answer

Change the font of a textarea with onclick in an option

<select> <option>Arial</option> <option>Open Sans</option> <option>Roboto</option> <option>Calibri</option> <option>Helvetica</option> </select> <textarea id="t...
asked by 25.08.2016 / 23:05
1
answer

Function constructor and function within function

I'm stuck on a JavaScript question that asks for the distance between two points using that formula d (p1, p2) = sqrt ((x1-x2) ² + (y1-y2) ²). The problem is that you ask: "Rewrite exercise 5 using objects created from a" Point "constructor f...
asked by 24.03.2016 / 16:58