Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ajax calls from one browser conflicting with other browser

Status
Not open for further replies.

ljwilson

Programmer
May 1, 2008
65
US
Here is my situation:

I have 3 computers all running the same web application (a custom cash register and sales system), the file structure is as follows:

cashreg.js = javascript app that runs the register and communicates via ajax methods with a server side php script

cashreg_ajax.php = the server side script that does MySQL stuff.

What is happening is that occasionally, two registers will process transactions at the same time (or really close to it) and sometimes when this happens, the items get mixed up between the two registers. I have a variable to identify register number and this is passed to the php script via GET. I have done some local testing and found that if I process a transaction at the same time, I will get some that don't wind up with a receipt on one register and sometimes, the receipt will print on the wrong receipt printer (belongs to the other cash register and is also identified through the registernum variable.

What happens when a php script is being called at the same time from two different clients.

BTW - my ajax calls are async.

I can post code if needed. It just seems like the requests are getting stepped on by the other client some.

Thanks,

LJ Wilson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top