Questions tagged as 'javascript'

3
answers

Open and Close div using the same button with JavaScript

I would like to make a menu appear and disappear (with fadeIn and fadeOut) using the same button, which in the case is a button with class ".hamburger" and I'm not sure how to do it. Ps: I would like that when you click on one of the menu link...
asked by 16.03.2016 / 17:50
1
answer

Access to json is returning error

I have the following json: x = { "body-json": { "id": "1" } } I'm trying to access the id this way: console.log(x.body-json.id); It turns out that I can not access the reference body-json . Can anyone help me?   ...
asked by 01.07.2016 / 19:54
3
answers

block the enter within an input

I have the following input inside a form: <input type='text' class='form_campos form_campos_nome' id='auto' name='verifica_nome3'> I need to block the enter key inside it, ie when the cursor is inside it enter does not send the form,...
asked by 28.06.2016 / 18:23
2
answers

How to store and retrieve the previous URL within the Cookie

The whole script is in the bookmarks / bookmarks bar, called: Bookmarklet I've already done script . See: Before c / referrer javascript: var URL = document.referrer; location.href = URL; Now with cookie javascript: var URL...
asked by 07.07.2016 / 01:26
1
answer

Angle function does not load in time?

When I try to use the following code in a website template: <img src="{{getImage(estabelecimento)}}"> The image loads correctly, but before loading this error appears in the console:    GET link 404   (Not Found) Everything l...
asked by 14.09.2017 / 08:40
2
answers

How to confirm that the request was made through the site securely

I would like to know if there is any way for me to confirm that the request actually came from the site and not from outside, and is also being done by the page with the action of the user. I tried to work out a solution to this, but it did no...
asked by 19.08.2017 / 04:32
2
answers

How to get the instance itself in a callback?

class Cat { constructor(name, picture) { this.name = name; this.picture = picture; this.count = 0; // ... this.img.click(function () { this.count++; // não funciona como eu espero...
asked by 06.09.2017 / 23:57
3
answers

Function invoking other functions

I have a form and 1 function to validate each field of this form function valida_nome() { } function valida_email() { } function valida_tel() { } function valida_senha() { } <form id="usuario_form" na...
asked by 02.06.2016 / 04:39
2
answers

how do I redirect a page by clicking on an option from a select by google chrome?

I am using this jquery already tried to use the change also but it does not execute <script> $(document).ready(function(){ $("#select-native-fc").on('click', function(){ if($("#select-native-fc").val() == "ASM2")...
asked by 24.06.2016 / 15:17
2
answers

JavaScript without working in HTML

Good, I need a little help which is as follows. I tried this code on my computer on an HTML page and it does not work, but on the fiddle ( link ) works perfectly. Am I missing something? Thank you     
asked by 14.06.2016 / 00:10