Now this function takes approx. 30-40 seconds to complete, and if i click on this node,the function starts its processing and if in the meantime i click on the other nodes,it generates an error
This happens due to multiple requests of the script, i wish to block request until response of one is rendered, i have also tried to do this with a flag called allowrequest,but the ealier script dies as soon as the new request arrives.
Please advice what to do in this case and how can i restrict another call until one response completes.
Thanks and Regards, Anand
SCJP 5.0 310-055 73%, SCWCD 1.4 310-081 78%, IBM DB2 9 Fundamentals 000-730 62%
30 to 40 seconds to complete a task is pretty outrageous. What's it doing? An Ajax request? I have many Ajax requests that do intensive processing and that return almost instantly. What's taking so long? Perhaps that's what you should be conentrating on.
Also, there's no inherent reason that your page can't be doing multiple things at a time. What is the cause of the error that you are seeing?
Choose Electrical Appliance Then Select Barbeque. The dummy data in the database has one or maximum two products for the other categories,the barbeque has 31 i suppose.
Each page shows 9 slides at a time which are Ajax calls for JSP page Slide.jsp
Slide.jsp picks the data from database and takes every Full Image and then resizes it with a GD library + PHP file.
Your suggestions and comments are invited.
Joined: Sep 10, 2005
One more thing the Client has asked to remove the Working On Your Request window,which locks the tree for further request.His opinion is that if a person clicks a wrong category by mistake he has to wait for the products to load of that category,which he is not encouraging.
Ah, I though you meant 9 serial JSPs (as opposed to parallel). That would have been very odd.
It all worked fairly quickly for me, with the "working window" being displayed for only a few seconds.
I agree with the client -- that's a rather unfrienldy way to be dealing with your JS bug. Your new plan, which seems to be to ignore the user clicks, isn't any friendlier.
You should be able to simply abort the pending Ajax requests when the user selects something else from the tree, and start over. It's a matter of properly structuring the code.
There's obviously a lot of client side code for that page -- a lot of which seems to be auto-generated dreck from Dreamweaver or similar tool -- so it's hard to give you any concrete suggestions at this point other than to use good coding patterns and object-oriented techniques.
To start with, you'll need to isolate what causes the bad reference when the tree gets clicked on a second time. [ April 29, 2007: Message edited by: Bear Bibeault ]
Joined: Sep 10, 2005
Please Check i really need some help on this as i am not able to trace the bug.I can pass the source code as well as a FTP access to the server for the modifications and testing.