Hi folks,
I have an existing web application that uses an agent to retrieve the documents records and prints its records into the web browser. But this agent takes a long time to print all the documents’ records. So wondering whether can i utilize Ajax techniques to allow the documents records to print out to the web browser once any as long as any documents has been processed.
The current code uses Print to print it to the web browser.
Hope you guys can help me cheers.
Subject: Use of ajax to print documents records.
You have not really provided us with enough information to answer your question definitively. If the agent must process a large volume of documents then it will take some time to run, whether you use AJAX or not. The only advantage that AJAX can offer you is some additional control over when the waiting is going to happen. If your page is useful to the user before it has all of its data then AJAX is going to offer some potential benefit, but if the page design requires that all data be there before the user can do anything then AJAX is not going to be any use to you at all - in fact it will be less performant than a traditional pure server-side design.
Subject: RE: Use of ajax to print documents records.
Sorry for lack of information provided but i will list the steps shown below:
-
First user will click on a button to search for a category of documents.
-
This button will trigger an agent that runs at the server.
-
This agent will finds all the documents related to this category through the different view
-
Then after it finds all the documents it will shown on the web browser.
The algorithm for the agent is shown below:
-
Get the category string that user specifically requested.
-
Go to a view and find all documents related to that view.
-
Loop all the documents and process and then print the document information then goes to the next document. This is done through Print statement.
Therefore I am wondering whether during the looping process, can i use ajax techniques to print one document information after it process this document.