Questions tagged as 'javascript'

1
answer

button to enjoy / break with AJAX

On a certain page I have a button / link written "Favor" <a href="SITE.COM/post/favoritar/ID" class="btn-favorite-normal">Favoritar</a> Where ID is the publication id, but I already have a script in PHP that will insert and re...
asked by 15.07.2016 / 17:09
2
answers

How to get the correct date using momentjs

Personal speech. I'm having some problem trying to use the library momentjs to work with dates. My problem is described below. ****--------- Datetime ----------**** Timestamp recebido do banco de dados -> 2016-07-12 17:21:40 <- ES...
asked by 13.07.2016 / 16:28
2
answers

How to change the text of an element by it plus another text?

I want to change the text of an element for it plus another text. This is a representation of my code: Javascript: var elementoTexto = document.getElementById("elemento").innerHTML elementoTexto = elementoTexto + " texto." HTML: &l...
asked by 16.07.2016 / 02:47
1
answer

Change src from iframe and post date with javascript

I have a script where I change the src of the iframe by java script (it has to be by this methodo), but I do not know how to send data by post only by get as it is only by the data in the url someone knows how to do this <div id="overlayedt...
asked by 06.07.2016 / 03:23
2
answers

Translate website automatically according to the netizen's country

I wonder if there is a function php or JS that through the visitor's IP could translate the site automatically according to the netizen's country without having to choose the language manually in a select. Suppose my site was visited by someo...
asked by 06.07.2016 / 05:13
3
answers

String with String.fromCharCode ()

The following script found here in the Stack prints from "aaa" to "zzz" by incrementing letters in order, one by one: var str= 'aaa', s= str; while(str!=='zzz') { str= ((parseInt(str, 36)+1).toString(36)).replace(/0/g,'a'); s+= '<br/&g...
asked by 17.06.2016 / 07:17
1
answer

Doubt on using checked="checked" in a jquery function

I have a form and wanted that when the page was loaded, if my checkbox is set, disable the "disable" property of the form. In the code example below, I put checked="checked" but it only works if I click to disable and click again to en...
asked by 11.10.2016 / 01:42
1
answer

Request the API using angularjs

I'm still new to development using AngularJs and I'm having trouble accessing an API: .controller('RegulamentoCtrl', function($scope, $state, $http, $ionicPopup, AuthService) { $http.get('http://rest-service.guides.spring.io/greeting')...
asked by 06.10.2016 / 22:22
1
answer

Date Formatting with Onchange Javascript

I'm having a hard time doing this kind of formatting in the field, if anyone can help me I'll be very grateful, well, I have a form field: <div class="form-group col-md-12 col-sm-12 col-xs-12"> <div class="col-md-2 col...
asked by 04.05.2016 / 19:16
1
answer

Confusions with JSON.stringify, JSON.parse, and OBJECT.push ()

Well I'm messing with these commands, in reality what I'm wanting to do is the following. Using localStorage maintain a database. NOME TABELA | DADOS TABELA tbl_TESTE | {teste 01, teste02, teste03, ...} tbl_TESTE02 | {arroz, feijão, b...
asked by 05.05.2016 / 19:57