views:

42

answers:

2

i make an ajax request to a php file that runs a while loop that looks for new data in the database, but i cant give it new data because the browser is blocked while waiting for the new data.

does anyone know how to not block the browser?

+1  A: 

Ajax is asynchronous. To avoid this kind of issue. It seems you're not doing an Ajax request, but a synchrone request. What is your syntax ? Have you a piece of code to show ?

Guillaume Lebourgeois
+3  A: 

Sounds like you didn't actually make an Asynchronous-JAX request, but rather a synchronous one.

If you're using a Javascript library, most of them have a boolean flag for whether or not the request should be asynchronous - make sure you're not choosing synchronous by accident.

Amber
yeah that fixed it, thank you!
Petre