In my application, we display a progressbar generated using javascript and css. The progress bar is displayed in a jsp page. Is there a way, I could capture this progressbar on page submit as a image(jpeg/png). Help on this will be highly appreciated.
JavaScript renders everything as HTML. A JPEG is a rasterized image. Abstracting your question becomes somewhat as: "Can I convert code into an image?" - and this is not something JavaScript is equipped to do.
The best you could do is to submit the progress of the progress bar to the server via an AJAX call. On the server have a graphics library (e.g. ImageMagick, GD) dynamically recreate the progressbar image using the coordinates you give it. This would really become overkill though, and my gut feeling tells me that there is a better solution for you than dealing with images.
Let me know what your goal is and maybe I can suggest something better.
Bookmarks