Questions tagged as 'javascript'

2
answers

When I put input inside some div the javascript does not work

I want to apply the css in a form but when I put the inputs inside some div the javascript does not work See the code: In case when I type the email and the password was for the blue button to be activated. <style> .btnDisabled{...
asked by 28.10.2017 / 19:09
1
answer

How do I prevent the child element from activating the parent element's event?

The click event set for the optgroup element is also enabled when a option is clicked. How can this behavior be avoided? $("optgroup").on("click", function() { console.log($(this)); $(this).children().prop("selec...
asked by 10.10.2017 / 16:10
2
answers

How to set and fetch saved objects in session in JavaScript

I'm wondering how do I save an Array of objects in the session, and then how to retrieve them. Today I use sessionStorage.setItem("pessoa", arrayPessoa); and sessionStorage.getItem("pessoa"); , but it is giving null when I send it...
asked by 27.10.2015 / 18:38
3
answers

javascript check if the attribute of an object exists

I have an object that I get, and sometimes it comes with an attribute other times not, my problem is in the sequence when I go to work with it see the example below: if( json.aviso != "" ){ //...fazer alguma coisa...
asked by 20.10.2015 / 15:38
1
answer

How to do pagination in CodeIgniter using AJAX?

I'm having a hard time finding a way to do paging using AJAX. I am accustomed to doing it both traditionally and directly with the server using Codeigniter as the application framework . However, this time I need it done without the refresh o...
asked by 24.12.2013 / 12:03
2
answers

How to save JSON file with Node.js

I want to make a website to test some things. The site is running on my home server made with Wamp. I was told I could make a small database using JSON files. I have a JSON file in the site folder that contains the following: [ {...
asked by 31.01.2014 / 01:57
2
answers

Insert JavaScript line

I'm doing an example validation for a dynamic table and would like a bug help here. When I do the first insertion it gives right, when mute, it lets insert and duplicate. $("button").click(function() { // alert('teste'); var cont = 0...
asked by 13.12.2018 / 14:06
2
answers

Send javascript object to php

I have the following class in php: class Corretor { private $id; private $nome; private $registro; private $email; private $senha; function __construct() {} /* Getters e Setters*/ } And in my html code, I have...
asked by 11.03.2015 / 16:11
3
answers

How to get the child element

I want to get the value of the plan by clicking the button. html <div class="price-button"> <input type='hidden' name='plano' value='Plano Padrão' /> <button type="button" class="sel-plan" title="Selecionar">Selec...
asked by 16.03.2015 / 13:29
1
answer

Send array by GET

I am sending% of a array in JavaScript to another page via a GET by calling the function. The problem is that sending is in string and not in array . I want to pass this array to the Lua language. This array contains values. Exam...
asked by 12.03.2015 / 17:07