Questions tagged as 'javascript'

1
answer

When selecting a select item, change the input field

I have the following fields: TheselectwillcontainRGandCPF.HowcanIdothatwhenselectingtheCPF,thefieldchangestowhathasmask?ThefieldthatcontainsthemaskIhaveready,Ijustneedtoincludeitinthischange.Seethecode:<tableborder="0" width="100%">...
asked by 03.11.2018 / 16:17
0
answers

Changing $ .getJson to $ .ajax

This code works perfectly: $(function(){ $('#id_categoria').change(function(){ if( $(this).val() ) { $('#bairros').hide(); $('.carregando').show(); $.getJSON('sub_categorias_post.php?search=',{id...
asked by 03.11.2018 / 15:03
1
answer

Go adding values from for into array

I created an array: var tagListArray = []; for(i = 0; i<resultados.item(i); i++){ tagListArray = ["valor1", "valor2"]; } console.log(tagListArray); This resultados.item(i) returns me values, how do I add them to the array?...
asked by 08.11.2018 / 14:37
1
answer

Difference from $ apply () and $ evalAsync ()

In an application where I have loaded several indicators from a dashboard I am using the $ apply () function to update the data of these indicators but in the console it presents the error "Error: [$ rootScope: inprog]", the function for $ evalA...
asked by 08.11.2018 / 11:43
1
answer

How do I get the value of a slidebar and display in an output?

I put a slidebar in my project with values from 0 to 10 and I would like it to display those values chosen by the user below or above it, I took some examples on the internet and tried to modify it and had problems with it. The slidebar I used w...
asked by 08.11.2018 / 14:19
0
answers

Use JavaScript to run external server application

I'm developing a player for a radio. The radio and player is hosted on one server and streamed on another. I want to get the album cover and the song playing from the streaming server. I have used this code, however it only runs on the radio ser...
asked by 08.11.2018 / 13:02
1
answer

pass variable to jquery function

I need to manipulate the clicked button inside this function, how to pass the btn variable into it? $('.btn_excluir').on('click', function () { btn = $(this); swal_confirm('Deseja realmente excluir o registro?', function (btn) {...
asked by 08.11.2018 / 13:53
0
answers

Preload loader for Views in Asp.Net MVC

How to make Asp.Net MVC have the feature while loading the page has a Load image and after loading all the content. I need this feature in Asp.Net MVC because this application is loaded in a WebView Xamarin Forms, and I realize that I must ha...
asked by 31.10.2018 / 22:17
6
answers

How to put default arguments (default) in a JavaScript function?

In R this would be very simple: funcao <- function(x=10) return(x) If you call funcao() without arguments, the result will be 10 . How to do the same in JavaScript? And how do I know if there are default values in...
asked by 09.05.2014 / 17:28
0
answers

Auto Update csv file in HTML Table with Ajax

I have a JS code here and it runs with Ajax. In the subject created I would like to load the csv already selected in the site, and every time I reload the page it loads the csv in the html table. No need to select and thus generating Auto Update...
asked by 31.10.2018 / 17:51