I’ve got GWT module where I do some stuff and I have search results – doesn’t matter in which form. Now after searching, and clicking on for example “Export to HTML” button,I would like to create new html page (for example from client side code by creating simple string which contains only listed results of searching list of results ) and open it in new browser window. I know that there is Window.open(…) method, but there I must specify url which i don’t have. I want to create this new html page by client side – without server inference (I don’t want to create some resource on server side and then paste url to this resource to client side). Is there any possibility to achieve this? If there is no option, other method which would satisfy me, is to open standard dialog box for saving, which will allow to save results in a html file.
Thanks for helps.
Kind regards.
Here’s the code I use to print:
Seems like you could adapt it for your purposes with some simple rewording and by removing the call to print()! The
contentsvariable just holds flat HTML. There are no trips to the server.