When using the asynchronous callback handler method you can not immediately show a screenshot in a web page because it will not have been generated yet.
Therefore a good way to get around this is to also make the web page asynchronous by using AJAX. An example of this is shown in the demo web application available for each programming language.
The basic idea is that when using the GrabzItImageOptions
class you should pass a unique id to the customId
method, such as a GUID. You will then use this customId to provide the filename of the screenshot in the handler.
Then you will need to create a simple page on the server-side that will indicate if a screenshot is ready when passed the value of the customId.
isready.php?id=123
Then use some AJAX that calls your server-side page passing the same customId if your page says it is ready, display the screenshot.