You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by JohnRodey <ti...@yahoo.com> on 2010/05/21 17:23:31 UTC

Display HTML in a new window from pivot app.

My pivot application builds an html string that I would like to display on a
new window/tab.  Whats the best way to accomplish this?  (desktop.browse()?
is that supported on most operating systems? Will it open it in system
default browser?) 

I would like to simply forward the html string to the new browser rather
than save the file and pass a url.  Both for IE and Firefox.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Display-HTML-in-a-new-window-from-pivot-app-tp834632p834632.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Display HTML in a new window from pivot app.

Posted by JohnRodey <ti...@yahoo.com>.
Thanks

  That's exactly what I did.  createTempFile() and passed that URI into
Desktop.browse().
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Display-HTML-in-a-new-window-from-pivot-app-tp834632p835331.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Display HTML in a new window from pivot app.

Posted by Noel Grandin <no...@gmail.com>.
java.io.File#createTempFile() is your friend here.

On Fri, May 21, 2010 at 18:05, Greg Brown <gk...@mac.com> wrote:
> You might be able to pass some JavaScript or HTML embedded in the URI to Desktop#browse(), but that doesn't seem like a great approach. Though it may be a bit more work, saving to file (or dynamically generating the HTML on a server) might be a better solution.
>
> On May 21, 2010, at 11:23 AM, JohnRodey wrote:
>
>>
>> My pivot application builds an html string that I would like to display on a
>> new window/tab.  Whats the best way to accomplish this?  (desktop.browse()?
>> is that supported on most operating systems? Will it open it in system
>> default browser?)
>>
>> I would like to simply forward the html string to the new browser rather
>> than save the file and pass a url.  Both for IE and Firefox.
>> --
>> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Display-HTML-in-a-new-window-from-pivot-app-tp834632p834632.html
>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>
>

Re: Display HTML in a new window from pivot app.

Posted by Greg Brown <gk...@mac.com>.
You might be able to pass some JavaScript or HTML embedded in the URI to Desktop#browse(), but that doesn't seem like a great approach. Though it may be a bit more work, saving to file (or dynamically generating the HTML on a server) might be a better solution.

On May 21, 2010, at 11:23 AM, JohnRodey wrote:

> 
> My pivot application builds an html string that I would like to display on a
> new window/tab.  Whats the best way to accomplish this?  (desktop.browse()?
> is that supported on most operating systems? Will it open it in system
> default browser?) 
> 
> I would like to simply forward the html string to the new browser rather
> than save the file and pass a url.  Both for IE and Firefox.
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Display-HTML-in-a-new-window-from-pivot-app-tp834632p834632.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.