Questions tagged as 'javascript'

2
answers

Reposition the side menu for floating while decreasing window

Good afternoon. I've been doing a lot of research on google, American stackoverflow and here, but I could not find what I needed. If I found something similar maybe you did not identify that it could serve me. I am a beginner / trainee in thi...
asked by 02.01.2019 / 21:29
2
answers

Display most important information from a JSON file

How do I display only some of the most important information in a list as in the example below? { "userId": 1, "id": 1, "title": "DRF - Delegacia de Roubos e Furtos", "endereco": "Praca Maua, 5 - Centro", "tel":"2233-2701",...
asked by 07.10.2015 / 04:01
3
answers

Execute command with variable -JS

Good morning, On one page, I have some div that I've put an effect on for them to appear (toogle) I would like this effect to be rotated whenever I execute its function. So, I discovered this function that shuffles the contents of an array...
asked by 20.10.2015 / 16:29
1
answer

How can I make an object 'auto-delete' in JavaScript?

I tried something like: function Objeto(){ this.del = function(){ delete this; } } var a = new Objeto(); a.del(); But the a variable is still existing I know the method mentioned in @bfavaretto's response, but for the c...
asked by 25.02.2015 / 18:17
2
answers

Use the callback of a function

$(function () { $("#formulario").submit(function() { var cidade_nome = $('#cidade option:selected'); var ano1 = $('#ano1').val(); var ano2 = $('#ano2').val(); var registro; var param_1; var resposta; $.post('envia.php'...
asked by 12.02.2015 / 22:15
1
answer

How do I return the weather forecast through the previsaodotempo.org API?

I'm trying to return a weather forecast query through the link API but I'm not getting any success. Where am I going wrong? $.getJSON('http://www.previsaodotempo.org/api.php?city=rio+de+janeiro', function(data){ $('.temperatura')....
asked by 20.02.2015 / 21:52
3
answers

How to generate multiple inputs within a loop of repetition

I need to create inputs based on the amount the user types. For example: var quantidade = 5; \\usuario digitou for(int i = 0; i< quantidade; i++){ //aqui vem os inputs } In this case I would also need to change the name...
asked by 02.11.2018 / 01:35
2
answers

Passing values from checkboxes to an element contained in a div

The example below works as follows: By supplying all the data (name, phone, status, and marking at least one checbox, a button is loaded within <div id="btnSubmit"></div> .) I can retrieve the name (in real time) and inse...
asked by 01.11.2018 / 15:48
1
answer

dropdown with pure javascript

Talk to people, good morning, I need a help with a dropdown. every donation in the database I have a button that I click on the items that have been donated. I have the following line of code: user-donation.js const dropdownBtns = doc...
asked by 13.11.2018 / 14:48
2
answers

Mount array through a list in ajax

I have an ajax function that consumes a webservice, and returns me a list, how do I get that list and I mount two arrays with the values? JS: function getCars() { $.ajax({ type: "POST", url: "CarService.asmx/GetAllCars", data: "Method...
asked by 16.08.2015 / 18:11