Questions tagged as 'ajax'

3
answers

When using success: function () and .done (function ()) in asynchronous requests?

In a simple way, I can write an asynchronous request like: $.ajax({ url: url, dataType: 'json', type: 'GET', success: function (_user){ alert (_user) } }); that alerts me to the _user return. Also, I write...
asked by 27.07.2016 / 19:39
3
answers

Can I make JavaScript write PHP?

Can I make JavaScript write PHP? Related: Can I write in JavaScript within PHP? Can I write ajax and javascript together?     
asked by 01.10.2015 / 17:33
2
answers

How to detect Ajax Request? [duplicate]

Is there any way in PHP to detect if the request is Ajax?     
asked by 22.05.2014 / 15:52
3
answers

Wait for Ajax return in synchronous function

I have an operation that I need to perform synchronously, but some of the information I need can only be obtained via Ajax. I tried to make everything synchronous with a wait for the Ajax return. The problem is that while any function is runn...
asked by 18.02.2014 / 21:01
1
answer

Is it a good practice not to close the .php file with? after an XHR call made from an .html file?

Should I close the PHP <?php tag with ?> ? A friend with more experience advised me not to close saying it was a "good programming practice", I never understood why, but I follow the recommendation ever. Is this really a g...
asked by 09.09.2014 / 04:27
1
answer

Error sending Upload with Ajax

I'm trying to upload a file via Upload to a certain folder but I'm not able to make or understand the error being accused by the script, I'll try to be as clear as possible in describing the problem. Here is the excerpt from Upload Upload: //...
asked by 28.07.2015 / 15:16
2
answers

Upload a page inside a div

I'm developing an HTML page for mobile and I have the following question: can you load one page inside another? For example: pagina.html : <div class="container22"> <div id="sidebar"> <ul>...
asked by 23.07.2015 / 01:56
2
answers

When to use and not use AJAX in submitting forms?

If I have a huge question form, would sending via AJAX be the best way? <form id="formulario" method="POST"> <!--vários Questionarios aqui--> </form> JavaScript: $.ajax({ type: "POST", data: $("#formulario")....
asked by 07.10.2015 / 16:07
2
answers

Block unwanted AJAX calls

I tested Google Plus, turned on Firebug and inserted a post. When analyzing Firebug I retrieved the URL where it was executed via AJAX. I copied the URL and ran it in the browser with the active session. It turned out to be an error:    F...
asked by 05.06.2014 / 13:59
5
answers

Difference between transporting data in JSON and String

I'm finishing building a site in PHP with the MVC architecture, the next step is to integrate the application (which only has the interface) with the core ( controller ) site, to fetch information from the database. data. Thi...
asked by 17.05.2016 / 05:06