Questions tagged as 'javascript'

3
answers

Format date on page load

Hello I wanted to format the date of my form in the page load, because the date is coming from the database in international format (yyyy-mm-dd). I made this function to format my date, however I have 2 forms on the same page and both have in...
asked by 04.02.2017 / 14:36
1
answer

Obtaining a specific property of a JSON object

I have the following JSON: { "2016": { "mes": { "2": { "dia": { "5": { "-KcENENmSJcZp56clzz5": { "descricao": "teste", "valor": "99" } } }...
asked by 05.02.2017 / 20:58
1
answer

How to fetch an element in XML using JavaScript

I want to do a search for a given element (in the name case) in a XML document, using only a input of type text. Code of what I've already achieved TagXML = function() { dados = "<doc>" dados = dados + "<c...
asked by 28.01.2017 / 18:07
2
answers

Calculate select field values for a form

Good afternoon everyone. I need your help. I have the following select multiple: <select id="precoFruta" multiple name="valores"> <option value="1.5">Macã - R$1,20</option> <option value="2.5">Uva...
asked by 28.09.2016 / 20:16
1
answer

Lacos while in javascript

I need to create a while loop that I sent a message x number of times to the console. var loop = function(){ while(){ console.log(""); } } loop();     
asked by 29.09.2016 / 21:30
1
answer

can I use the same Id that I set for Name in HTML?

In order to manipulate the html tags in php I need to set a name for them, while javascript uses the id, but can I have some kind of future problem if I use the same name that I set for name in ids? br> Ex. <input type="text" id="user" nam...
asked by 30.09.2016 / 04:44
1
answer

How to set a variable in the Scope Angular JS

I have the following dropdown: <select> <option ng-repeat="x in Ruas">{{x.Rua}}</option> </select> I need to get the value selected in the dropdown (x.Rua) and set it to an attribute of another scope called: hom...
asked by 30.09.2016 / 17:09
2
answers

Popular DropDownList from another

Good morning, I have a DropDownList populated from a Model class. example: Processor, Memory, HD Afterclicking"+" I have to add another DropDownList with all values less than the value selected in the previous Combo. @if (Model.ListAtri...
asked by 08.03.2017 / 15:27
4
answers

Check if object already exists in array by id

I'm developing a project, where a user will set up a list of contracts, searching for cpf, but if he searches for the same cpf 2 times, the contract repeats in the list, as I do to check if the contract already exists in the array list and prev...
asked by 28.09.2016 / 17:06
1
answer

chained ifs, correct usage

I am creating a function that takes the values of a table that are in range, 1-49, 50-99, 100-199, ..., 300+, the code takes the value of an input and based on this value identifies the range and calculates the value of the product. So far th...
asked by 02.03.2017 / 13:17