Questions tagged as 'javascript'

1
answer

Ajax locking page exchange (LongPolling)

I am trying to complete a connection using Long Polling, where the browser sends a request to the server and is waiting for a response. To prevent this port from being infinitely open, I created a routine so that every 10 seconds the server send...
asked by 17.10.2014 / 16:03
1
answer

How to do multiple inheritance in javascript

I have seen several ways to do inheritance in javascript, but I do not know how to do multiple-inheritance function Transporte() { var nome; this.getNome = function () { return nome;...
asked by 25.06.2015 / 22:11
3
answers

How to pass a json containing data array to Php?

How could you send the following Json to Php without missing the " tabs " part, where you have an array !? The original Json is made up of a single line, so I put it here just to improve the view: {"csTipoPagamento":"20", "csClassificacao":"14...
asked by 02.07.2015 / 04:51
1
answer

Image Preload JS + HTML

Well, I have an embedded application where our processor is not the best, which gives some problems. Let's say I need to display images for 10 to 10 seconds, in theory, it would just make a little counter there and wait to change the image, h...
asked by 20.11.2015 / 19:15
2
answers

Read a "value" within a "select / select"

How to read options values from a <select></select> using HTML5 + JavaScript? Ex: <select name="tAtividades" id="cAtividades"> <option value="0" selected="selected">Selecione o Tipo</option> <...
asked by 20.11.2015 / 22:16
2
answers

How does NodeJS manage package.json in subfolders?

How does NodeJS manage packages.json in sub-folders? You have your normal application but have sub-modules that you want to have your own dependencies, how does Node manage it? Does it create another node_modules and put all files back...
asked by 27.11.2015 / 16:56
1
answer

How to serialize with input disable?

In a response in the SOEN They pass an approach of temporarily disabling the fields: Example: var myform = $('#myform'); // Encontra os elementos e remove o atributo disable var disabled = myform.find(':input:disabled').removeAttr(...
asked by 20.11.2015 / 14:02
1
answer

requestAnimationFrame, setInterval, and setTimeout

I would like to understand more about the nature of these three functions mentioned above. What is the main objective for each one? When it comes to animations, what is the best option for DOM changes?     
asked by 30.11.2015 / 20:38
1
answer

How to bookmark an event in datepicker?

I have this code in javascript: $(function() { $("#calendario").datepicker({ changeMonth: true, todayHighlight: true, changeYear: true, showOtherMonths: true, selectOtherMonths: true, date...
asked by 10.12.2015 / 12:23
1
answer

Rest API and Sessions, how does Login work?

I've always worked with PHP / MySQL and Javascript / jQuery. I've always connected PHP with the database directly, and I use sessions to log in. I'm currently working on a project where I use AngularJS for the frontend and PHP / MySQL for the...
asked by 08.12.2015 / 21:32