Questions tagged as 'javascript'

0
answers

Request in real time with ajax

I need to update some information in real time, I did some research here on stackoverflow and found a very good post but I could not make it work. The posting explained the following: Ajax notifies you if there is a change or not, if the chan...
asked by 08.11.2016 / 23:28
0
answers

return method JS

I have the following method: $scope.upload = function (files) { if (files && files.length) { for (var i = 0; i < files.length; i++) { var file = files[i]; if (!file.$error) { Uplo...
asked by 08.11.2016 / 21:57
1
answer

CRSF protection when deleting multiple AJAX items

When I use a single form, for example, I create a token and a session to "control" that the request will only be executed from the source. but when I have several buttons, which will be called via AJAX, what is the best way to get around this...
asked by 21.10.2016 / 08:09
0
answers

Error displaying vector variable

Good night guys, I need a help with a vector in JS ... When I enter this way it works OK, it displays all messages, but when I put the test variable in place it does not display anything: var teste = document.getElementById('conversa')....
asked by 20.10.2016 / 23:11
0
answers

Ajax only results in the console?

Good afternoon guys, I can get a result in the log, but the div is not passed, my source follows: Index.php var teste; $.ajax({ url: 'conversa.php', type: 'GET', success: function(res) { $("#conversa").html(res)...
asked by 20.10.2016 / 19:49
1
answer

Fill DropDown from the selection of another DropDown [duplicate]

I'm trying to fill a DropDown from the selection of another DropDown , basically, when the user selects a state in a DropDown , the cities of this state must be displayed in another DropDown , dynamically . I have t...
asked by 18.10.2016 / 15:35
0
answers

How to make a side menu that expands by pushing the body? [closed]

In the style similar to that of this site here: LINK     
asked by 05.12.2016 / 05:47
0
answers

Dependent dropdown after loading of DIV

I have in the file Fields.php the code below, which selects the company and according to the request will load divs with fields specific to that request. At the first request, I have to load Headquarters and it is loaded according...
asked by 06.12.2016 / 14:05
0
answers

Get values of buttons that are randomly generated [closed]

I need to get the values in the click event of the buttons, which are automatically generated with php . I am not able to do the javascript/jquery function to do this. Here is the code that generates them: while ($i != $max) {...
asked by 06.12.2016 / 16:06
0
answers

SockJS WebSocket

I'm trying to use SockJS, and I put in the HEAD of my index <script src="//cdn.jsdelivr.net/sockjs/1/sockjs.min.js"></script> and javascript: var wsUrl = 'ws://' + window.location.host var ws = new WebSocket(wsUrl + '/aplic...
asked by 07.11.2016 / 18:44