Situation
I was putting together a widget when I started to analyze a possible error, because the tests actually occurred:
Test
document.getElementById('teste').addEventListener('click', function(){
n.p.call(this);
setTimeo...
How to get the size of a page and how it was downloaded to calculate the percentage of your upload. But I would not use any framework , just pure JS.
I actually want to try this .
I have an operation that I need to perform synchronously, but some of the information I need can only be obtained via Ajax.
I tried to make everything synchronous with a wait for the Ajax return. The problem is that while any function is runn...
In PHP, we can convert a line break to a <br/> through the function nl2br .
What about JavaScript? How can I do this in a secure way?
I decided to ask the question because I do not know if a simple replace("\n") f...
I have a dynamically generated table, and I want to put input inside every td . I can get the id of tr , so I do:
$("#id").children().html("<input type='text' value='" + valor + "' />");
So it puts a input wi...
Is it possible (if so how) to do the following method with JavaScript?
The person types in a form some arguments,
When you click send it will execute a JavaScript code,
In this code the function will get the form information and will ope...
I have a jQuery script that starts two or more asynchronous operations at the same time, and I would like to execute a callback when all are complete. An example would be to start an animation to hide the current page, while I make an Ajax r...
I was reading the documentation here and it seems that the placeholder attribute does not work in IE8. Would you have any way to simulate the placeholder you use?
HTML example that does not work in IE8:
<input type="text"...
I have a function in javascript that applies a particular style in some classes, and I would like to know how to do this style by clicking the same button.
var botao = document.getElementById("troca");
var cores = document.getElementsByClassNa...