Questions tagged as 'javascript'

1
answer

Show / Hide div using a 'radio button'

I need to check the status of my radio button so that if it is active on "Yes" , it opens <div class="camposExtras"> , if you click "No" It closes div , and this should be accessible at all times. My radio butto...
asked by 10.09.2016 / 03:39
2
answers

Add attribute to dynamically created object

I'm trying to add a data-id to objects that will be created dynamically, well the point is I want to do this as soon as the document or my object loads without the need to click etc, see the way I tried. For example: $(document).on('...
asked by 12.09.2016 / 16:40
1
answer

What are the names and differences between the following ways of working with objects in JavaScript

I wrote the same code in several ways, but I do not know how to describe each one of them, their correct name and differences. The codes are as follows: // Código 1 function Pessoa(nome) { this.nome = nome; this.dizerNom...
asked by 11.07.2016 / 04:45
2
answers

logout error servlet cookie

Hello. I'm having an error on the line: Cookie cookie = new Cookies(req.getCookies().getUsuarioLogado(); The complete method / class is this: @WebServlet(urlPatterns = "/logout") public class Logout extends HttpServlet { protecte...
asked by 12.07.2016 / 14:49
2
answers

Do not let the php file access via browser [duplicate]

Speak, I'm having a problem, I'm making a system that generates points for the members only to generate it, it has to wait for 30 seconds on a specific page, after that 30 seconds I use (script) to call this file . so there is always a smart g...
asked by 13.07.2016 / 18:25
1
answer

multidimensional array javascript

I have a following doubt. I will simplify as much as I can for you to understand. I am developing a game and I have an array with values. This array is multidimensional: var valores = [["jaguatirica", "onça-pintada", "suçuarana"],["sabia","can...
asked by 13.07.2016 / 16:06
1
answer

How to give querySelector in attributes with space?

Ex: I have a <div arvalue="Teste Novo"> , and document.querySelector("div[arvalue='Teste Novo']").style.backgroundColor = "green"; If I take out the space of arvalue and put TesteNovo and change the query arvalu...
asked by 11.07.2016 / 21:36
2
answers

Function does not rotate 2x

I have a function selectStep() that receives a onclick per parameter 1 or 2 , it rotates what was passed. The impasse is that I have two divs Content1 and Content2 , both with the same thing. But only the...
asked by 08.11.2016 / 23:57
1
answer

Forward and back button

I need help to make a forward button and return the month from a list of birthdays. The data will be sent via POST to a class that does the query. The PHP part is ok. I need to adapt JavaScript . PHP $data = date('Y-m-d'); $...
asked by 10.11.2016 / 14:19
1
answer

Remove div "Clone" in jquery

I have a div that can be cloned in jquery, I need to click on "Close div" to remove the cloned div when it is clicked ... Follow the code .. $(document).ready(function() { var linha = $(".engloba:first").clone(); $("#mais").cl...
asked by 10.11.2016 / 18:29