Questions tagged as 'javascript'

1
answer

Verify checkbox state - bootstrap switch

I'm using bootstrap-switch in my checkboxes and would like to check the status of my checkbox when loading the page using the library itself.     
asked by 09.09.2015 / 03:37
1
answer

Adding JavaScript Decimal Places

I have 3 JavaScript variables: valorUm = 2.8 //dois ponto oito valorDois = 2.415 //dois mil quatrocentos e 15 valorLivre = 25 //vinte e cinco What I need is: valorUm + valorDois - valorLivre This calculation returns -19.785 and should...
asked by 11.08.2015 / 03:39
1
answer

TinyMCE - How do you make it the required field?

I'm using a TextArea field with TinyMCE for text posting and would like to know if some validation can be added so it does not accept blank values. I have tried to add required of HTML5 , but when I try to send the...
asked by 19.12.2015 / 14:03
2
answers

Turn image into Base 64

I am transforming an image that I send by the camera in base64 but the image is all black, I do not know what is wrong, it follows my code below app.encodeImageUri(mediaFiles[i].fullPath); //Aqui envio o caminho da minha imagem da seguinte man...
asked by 21.08.2015 / 20:53
1
answer

Display input based on the option of a select

I want to display a input based on the option that I choose through a select . If I select 1 it shows input 1 , if I select 2 it shows 2 but gives hide() no 1 . Currently the code lo...
asked by 26.11.2015 / 21:38
1
answer

Function in javascript run on each element

Good morning friends. I have the following problem. I'm developing a variable that contains a list of products. var produtos = new Array() produtos[produtos.length]="OUTROS|Catchup|1 sache|10" produtos[produtos.length]="OUTROS|Mostarda|1 s...
asked by 24.11.2015 / 13:25
1
answer

Change style in ng-click and after a while return to normal with AngularJS

I have the following problem: I need a field to be shown in a solution with a "mask" as if it were hidden. When an event occurs or a click on a button (or on itself) such field is filled with a value and after a time it is shown again with its "...
asked by 28.07.2015 / 16:26
1
answer

How to call a function after the user release the mouse click?

On a page there is an element that the user can drag with the mouse, I would like to call a function after the user drops this element (when they release the mouse click). How to do this without reference to the element, just recognizing that th...
asked by 29.07.2015 / 23:29
1
answer

Ruby on Rails and Javascript

I have the following in the controller in Ruby on Rails: def index @categorias = Categoria.find(:all) end In my View I have the following code to get the categories: <script type="text/javascript"> var teste = <%= @ca...
asked by 17.06.2015 / 20:30
1
answer

run loop updated with js returning another

Well, the code here is from below where: <html> <head> <style> #main { border:#333; border-width:2px; border-style:solid; } </style> <script type="text/javascript"> var map = Array([0,0,0,0,0,...
asked by 12.06.2015 / 22:17