Questions tagged as 'javascript'

1
answer

How to change text from a header element in JavaScript?

What is the best function that changes the text of a header element ( h1 , h2 , h3 , etc) through JavaScript? I tried this way to change the text: function mudarTexto(id, novoTexto){ document.getElementById(id).innerText...
asked by 08.10.2014 / 16:25
3
answers

Bootstrap Carousel with two vertical items

The challenge is to: Make a Carousel using Bootstrap , which displays two items at a time, aligned vertically. Here's an outline of the idea: IfoundsomeexamplesofCarouselusingmultipleitems,butnotverticallyaligned. link I tried to impleme...
asked by 25.09.2014 / 22:33
1
answer

How to display the values of a JSON via PHP?

How can I display the values of a JSON via echo in PHP, I am using the code below to receive JSON from the Post Office site $json_file = file_get_contents("http://cep.correiocontrol.com.br/$cep.json"); $json_str = json_decode($json_fil...
asked by 02.01.2015 / 23:30
2
answers

How to add a javascript variable in PHP? [duplicate]

I want to get the variável of the vetor that I create in the JS and store the contents of it in one of PHP . <?php print("<SCRIPT language=javascript> vetor_dados[$cont] ="text";...
asked by 08.10.2014 / 19:27
1
answer

Create policies with Angularjs

The button should display an alert but nothing appears, nor an error. What is wrong? Here is the code: angular.module('App', []) .directive('sonclick', function () { return {...
asked by 12.01.2015 / 20:35
1
answer

Get selectedIndex of combobox and pass to input?

In the following example I get the value of the description in the alert; I need to get this text from the drop down box in the value of an input field ... how to adapt this? I have to submit this description via post! Note: I do not want to sen...
asked by 22.12.2014 / 04:21
2
answers

Insert mysql using ajax

I'm trying to insert a record into the DB via ajax but I'm having problems, I was using format: 'json' but it was giving permission error and talz, now I'm using type: "POST", dataType: "jsonp" . Anyway, this data for me to insert t...
asked by 12.08.2014 / 19:28
2
answers

jQuery Date "Invalid Date"

I have a countdown function that works regularly on Google Chrome var now = new Date(); var countTo = new Date("9 July 2015 14:30:00:00"); alert(countTo); $('.timer').countdown(countTo, function(event) { var $this = $(this); switch(e...
asked by 06.08.2014 / 16:36
1
answer

Problem with Uppercase and Lowercase in Angularjs

Personal follow the example of a script on stackoverflow.com as follows the link below: [link] I happen to be having problems with words that are capitalized eg a word that is "Protocol" and I type "protocol", the filter does not find it....
asked by 31.01.2015 / 23:35
1
answer

$ .inArray () return not expected

Array cookiesplit contain exactly this content: _utma=246244038.1458519878.1422527074.1423248864.1423253252.8, __utmz=246244038.1422527074.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none), _ga=GA1.2.1458519878.1422527074, newsletter=ok...
asked by 07.02.2015 / 03:39