Questions tagged as 'javascript'

2
answers

Call form send by function

I'm trying to send a form through a function. Follow the structure. form with id: last name input with id: nickname event keyup no input. onkeyup="$(this).check()" Javascript (function($) { $.fn.check = function() {...
asked by 24.06.2016 / 01:25
1
answer

How to check variable only with spaces in javascript?

I have a chat system, and the send button should not be enabled while the user does not type a letter. In the example below the button is enabled when the user types something, but if he type only spaces the button is displayed. $('#msg').o...
asked by 24.06.2016 / 13:55
1
answer

Error with popular google charts

I'm encountering the following error:    VM3611: 231 Uncaught Error: Unknown header type: 6 Code: google.charts.load('current', {'packages': ['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var js...
asked by 29.07.2016 / 18:34
1
answer

Pick up the size of an image

Is it possible to get the javascript size of an image outside of my directory? For example in this usage: .divExterna{ background-image:url(http://www.backsite.com.br/datafiles/suite/escritorio/aplicativo/conteudo/album_fotografico/769.jpg)...
asked by 29.07.2016 / 17:03
1
answer

Left alignment with element collision detection

Alignment criteria:  - Align left from element with lower value of 'left'.  - Elements with collision must remain beside the collided element. In the example the algorithm searches the leftmost element in reference to the other elements a...
asked by 30.07.2016 / 01:31
1
answer

Manipulate an image before adding it to a canvas element

I'm adding an image dynamically to a canvas , but I'm not able to resize it correctly. var img = new Image(); img.src = "http://i.stack.imgur.com/lIaBN.jpg"; function inserir() { var canvas = document.getElementById('meuCanvas...
asked by 30.07.2016 / 06:01
1
answer

How to Format Each HTML Tag with Its Attributes in Assorted Colors?

An "image" says more than many words is not true !? So I invite you to see the: Example link    In this image we see some "tags" formatted in the colors "red", "maroon" and "skyblue". What I want with this is to do what an HTML ed...
asked by 29.07.2016 / 20:56
1
answer

PHP and javascript - Getting javascript value in PHP (session usage)

In the site that I assumed from another developer, made in PHP and Javascript, there is a search for created events (all registered in MySQL database table). In each event that I searched for, I created a button to delete it: <input name="e...
asked by 14.06.2016 / 15:59
1
answer

How to hide undefined or validated variables after reloading the page?

I have 2 variables that get the values of an input type month , but when the code is executed for the first time ie when the page loads, the variables are undefined and the code takes the pc date. I would like to know if you can hide them,...
asked by 14.06.2016 / 14:35
1
answer

How to know the type of the DOM object

I'd like to know if I'm using JS or Jquery, there's a way I can identify the kind of DOM object I'm manipulating. For example, I make the following selector: $('#filtos select, #filtos input').each(function (index, obj).....); Insid...
asked by 15.06.2016 / 17:15