Questions tagged as 'javascript'

2
answers

How to refresh link without refresh with javascript?

Good evening, is there any function that refresh on anchor link without reloading the page? I am creating a system for liking articles, but I would like to create a way to change the link "like" to "unlike. I tried to make a location.href...
asked by 15.01.2016 / 03:32
3
answers

FileReader or alternative to IE9

The FileReader object allows web applications to read asynchronously the contents of the files (or pure data buffers) of the user's computer. The following supported browsers are: Firefox (Gecko) - 3.6 (1.9.2) Chrome - 7 Internet Explorer -...
asked by 15.02.2016 / 13:13
2
answers

How to sort a select combo by the options text?

I want to sort a select combo from HTML alphabetically and would like help with logic to get a function to do that, regardless of the number of elements.     
asked by 18.05.2015 / 16:01
2
answers

Paste outer html

How do I get the outerHTML of a jquery object? The following form is not working. $("selector").outerHTML;     
asked by 12.05.2015 / 16:50
2
answers

Avoid submitting form by pressing the Enter key

I have input in VueJS that is within form and when I press enter I do not want form to be submitted. Together with VueJS I'm using Quasar and I was able to assign the function call only on the enter key: &...
asked by 18.10.2017 / 15:05
2
answers

onclick event does not work in chrome!

I am not able to perform a transition exercise. I have the img of the lamp erased and another one lit and a ragged one! Until the access I did, but when it's pa, breaking the code does not work! Here is the source code: <!DOCTYPE html...
asked by 28.10.2017 / 22:03
2
answers

When and why to use: hover and onMouserOver and onMouseOut?

I'm studying about hover , onMouseOver and onMouseOut . Suppose in this situation I want to change the background of an image when I pass the mouse on it. What is the correct way to program? Is using CSS (: hover ) or through JavaScript...
asked by 18.10.2017 / 17:46
1
answer

Uncaught TypeError: Can not read property 'validDocument' of undefined

I'm trying to create a validation function inside ValidationEngine, however I'm getting this error: Uncaught TypeError: Can not read property 'validDocument' of undefined E I can not identify the problem. I have another site using the sa...
asked by 25.10.2017 / 19:23
1
answer

The function returns undefined. What's wrong?

var pulaLinha = function() { document.write("<br>"); } var mostra = function(frase) { document.write(frase); pulaLinha(); } var calculaIMC = function(altura, peso) { var imc = peso / (altura * altura); return; }...
asked by 06.09.2018 / 03:51
2
answers

When should I use a string object and a literal string?

Reading an article I find the following excerpt:    You can call any of the methods of the string object in a   string literal - JavaScript automatically converts the literal string   for a temporary string object, calls the method, then disc...
asked by 23.08.2018 / 02:34