Questions tagged as 'javascript'

1
answer

Random photo with javascript

Colleagues I would like every time the user accesses the site, a different image appears. I know how to do with PHP, however in this case I would like to do with javascript. I believe the Math.random () , but I do not know much javascript. I...
asked by 13.05.2017 / 19:17
1
answer

TypeError: obj is not defined, but the variable is defined

When I try to run the following code var largura = 800, altura = 500, mainColor,canvas,ctx, player = { x:400, y:250, largura:50, altura:50, color:"#cc3030" }, obstaculo = { obstaculos:[], time:0, inse...
asked by 14.05.2017 / 03:27
1
answer

How to filter a json object with jQuery?

I have the following json object: var json = { "tpAmbiente":null, "hotelPesquisa":[ { "dtEntrada":"20170510", "dtSaida":"20170511", "hotel":{ "id":94, "nome":"Itamarati" }...
asked by 08.05.2017 / 18:55
1
answer

Change date format to Brazilian default, datepicker JQuery

I'm having a problem with date format, if I put dateFormat: 'dd/mm/yy , my alert returns me invalid date, if I pull it off and leave American default then returns the date. Any ideas how to resolve this? I want to keep the Brazilian sta...
asked by 07.04.2017 / 19:57
2
answers

Show textarea corresponding to href

I have this JavaScript / jQuery snippet where I have a hidden textarea and a href . The intention is to click on href to textarea to appear so that the person can type his answer. I'm not able to open textarea...
asked by 10.05.2017 / 01:14
1
answer

How to use random script

I have 3 Google adsense scripts with 300x250 - 160x600 - 728x90 How do I get one of these scripts to be loaded each time the page is loaded? I would like each Reload of the page to be shown 1 script. Example: I have the one that is u...
asked by 05.05.2017 / 18:12
4
answers

Increase in JavaScript function

I'm having trouble incrementing a javascript function. I have a table with the following structure: <table id="products-table"> <tbody> <tr> <th>Produto</th> <th>Código</th> <t...
asked by 09.05.2017 / 21:55
1
answer

effect with jQuery on select

I'm putting together a custom input with the style of google's design material. The effect is working in the input, but in the select is not working. Does anyone know what I'm doing wrong? NOTE: The effect I'm referring to is the blue line...
asked by 10.05.2017 / 00:17
2
answers

Limit character entry in EditFor in MVC

I have a character limiter for just TEXT. Now I need the characters to be limited to only 2 (I want to make the user type the state, for example: PR, SP, RJ ...). How do I do it? $(document).ready(function () { $(".apenastexto").ke...
asked by 18.05.2017 / 02:23
1
answer

I'm using a mySQL Bank where I store bookmarks for a map

I'm using a mySQL Database where I store bookmarks from a map (in the table I store the latitude and longitude of these bookmarks) my question is, do I make a select by picking up all markers that are in a proximity radius of a point bookmark),...
asked by 30.03.2017 / 15:10