Jump to content

two ajax request at the sametime


DanDaBeginner

Recommended Posts

hello gals and guys... really need help..

 

I  need to execute a two ajax request, one will be run for every 5 seconds to check against the database if theres a message that has been sent to the user, if foun then theres a pop-up informing the user that theres a message and one will be viewing message, sending message, etc..

 

now my problem is since the first request executes every 5 seconds and if the user decided to send a message so there will be two request at the sametime but on different pages, the first one will be sending and fetching to check.php and the second one to send.php..

 

am I going to have a problem on this one? do you have a better idea on this one?

thanks in advance!!! :)

Link to comment
Share on other sites

maybe my previous message was confusing...

 

lets not talk about the messaging, I got AJAX request that executes every 7 seconds to see if somebody commented to his/her blog post, and got a link that when a user clicked an AJAX request will be sent to fetch all the online members... so what will be my question?

 

since I got an AJAX that executes at 7 seconds and the user click on the link because he/she wanted to see who is online at exactly 7 seconds.. so there will be two request at a time... will that be a problem? will it cause an error?

 

please help...

Link to comment
Share on other sites

I have 2 AJAX functions that populate drop down menus in the same form, from a database, they end up running at the same time. Each has it's own pair of functions, one to call the php script, and one to handle the response. (same PHP script), it works just fine.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.