Questions tagged as 'javascript'

1
answer

Error with duplicate values in AngularJS

I have a duplicate values problem in AngularJS, in my JSON will always have repeated categories, in ng-repeat I used track by $index but the error persisted. My controller code: angular.module('starter').controller('Guia', fun...
asked by 27.07.2016 / 23:32
1
answer

Get return of a PHP function in JS

I'm starting now and my question is simple, I have a function created inside a class in a php file, and I want to get the return of that function in another javascript file, how do I do this? has something to do with ajax request?. Php file,...
asked by 28.07.2016 / 17:22
1
answer

How to make array2 have the same relation between the indexes after the shuffle of array1

   array1 = [1,2,3];   array2 = ["one", "two", "three"]; array1 and array2 have a direct relationship between indexes.    Shuffled array1 - > array1 = [3,1,2]; How to make array2 have the same relation between the indexes after th...
asked by 29.07.2016 / 00:51
1
answer

Javascript formatting problems with currency

Greeting for all, I'm going straight to the point; When I enter the page I fill out a form and the value field gets the currency formatting working, as you can see below; Aftersavingthecurrencyformattingdoesnotworkanymore,unlessIrefres...
asked by 10.12.2015 / 19:09
1
answer

How to ask the reason for an exclusion using confirm and prompt?

I have a project ready and I need to make a change. When I am going to delete a record named print "javascript:if(confirm('" . $msg . "'))"; however I have to ask the reason for the exclusion. I would like to ask this reason with a prompt...
asked by 10.12.2015 / 12:41
1
answer

Phonegap + Cordova + sqlite

I have a problem with a misc. bank file. I created a .db file with all the columns and contents and compiled it along with the apk. The last change I made in the bank after performing a new build is giving error saying that my table does not...
asked by 10.12.2015 / 19:02
1
answer

Book query by ISBN and save result in txt via console.log

Context: I have a list of ISBN (International Standard Book Number) with about 100 records, all Brazilian books, and I wanted to get the information on the book in a faster way, but does not have to be in real time. To search the book vi...
asked by 13.05.2016 / 20:11
2
answers

graph with data from a REST service

I have a REST service done in PHP and it returns me data in JSON . When consuming the API url in REST, I need to display the data in graphs made in javascript. Does anyone know of any framework in JS that generates graphs of a...
asked by 13.05.2016 / 15:47
1
answer

format a multi caption with "R $" using Chart Chart JS

When I add a second line in the chart the caption is incorrect "without the $". How can I solve this problem? Thank you function formatar(valor) { var moeda = 'R$'; valor = ('' + valor).replace(',', '.'); valor = ('' + valor).spli...
asked by 18.05.2016 / 21:40
1
answer

Send multiple "select" text to the same "input text"?

Given the code: var select = document.getElementById('meuSelect'); var input = document.querySelector('input'); select.addEventListener('change', function() { var option = this.children[this.selectedIndex]; input.value = opt...
asked by 14.05.2016 / 01:18