Questions tagged as 'javascript'

1
answer

XMLHttpRequest can not load in Vue js

My app.vue <template> <div id="app"> <h1>{{ titulo }}</h1> <li v-for="usuario of usuarios"> </li> </div> </template> <script> export default { name:...
asked by 28.08.2017 / 20:26
1
answer

Error in .js file

Include an .js file in an MVC project. my .js file looks like this: $(document).ready(function() { function escondePanel(painel) { $("#pnPessoal").css("display", "none"); $("#pnContato").css("display", "none"); $("...
asked by 12.08.2017 / 04:03
1
answer

Switch javascript always falling in default [closed]

I'm studying js, I want to do a seconds converter in minutes and hours. I was doing a test to see if everything is working 100% and I've come across a problem. This is almost an hour ago breaking the head. I would like someone to point me whe...
asked by 05.08.2017 / 01:56
1
answer

ReferenceError: button is not defined

I wanted to know what the error is in this code. The button is set, yes, and the console is pointing to this error. <script type="text/javascript"> window.onload = function() { var botao = document.getElementsByTagNam...
asked by 05.08.2017 / 22:50
1
answer

Laravel 5.4: AJAX request using route with JS variable?

I need to use a Laravel route within the AJAX request code. The way I mounted it does not work, but it does not work. I believe the call of the variable ( servico ) is wrong, because I manually set a number like this: {{ route('getE...
asked by 05.08.2017 / 15:22
1
answer

Problem in hiding div

I made a function in JQuery to hide / display 2 divs. The first div works normally, but the second one does not: / The idea is to hide the div, change the button icon and change the text at the same time: $(document).ready(function () {...
asked by 04.08.2017 / 21:35
2
answers

jquery blur on dynamic inputs

I have a form where I dynamically create the <inputs> With the following structure: <input class="form-control placaCss Tamanho200 text-box single-line valid" id="Veiculos_3b875035-ae1b-4b69-8ddc-462bbfd86fbd__Placa" name="V...
asked by 06.08.2017 / 05:14
2
answers

Error receiving array from php in ajax

I have a script like following code: $("#submit").click(function(){ var dataString ={ nome : $("#nome").val(), status : $("#status").val(), id : $("#id").val() }; $.ajax({...
asked by 05.08.2017 / 20:11
2
answers

Should I use form or div?

In case of being sent with ajax I believe that it is recommended to use the form tag, but what if I just do something with javascript, ie only on the client side, for example change the background color of the application, or generate some rando...
asked by 09.09.2017 / 22:35
1
answer

Doubt in JScript - Center image

I have a function that puts images in the background of a circular div. Home I would like to center the image in the center of the circular div as in the following example: Ithoughtaboutputtingbackground-position:center;inJScript,willitwork?...
asked by 21.09.2017 / 14:10