Hi Anthony,

Mayhall, Anthony J. (MSFC-NNM08AA21T)[TBE 01] wrote:
> Are you saying that that isn't possible?  How would you set qx up in the
> new document?
It's possible, but you have to point that new document to a URL which 
starts up another qooxdoo application.

> I want to be able to open a new document and put some
> formatted xml text in it so I can save it out.  Right now, all I am
> doing is using newwindow.document.write(text), but I have to convert the
> xml to html to write it to the window.
Now I'm getting it :)

>  Is there some easier (non IE)
> way to write xml out to a file from within Javascript or qx?
You cannot write out anything to a file with JavaScript since you do not 
have access to the filesystem. The browser does not allow this and does 
not provide an API for it.
If you want to provide a solution for your users to save the XML file I 
guess you have to work with your backend. A possible (server-oriented) 
solution would be

1) Send the XML to your server
2) The server transforms it to HTML and saves the file temporily
3) The server sends back an ID to access the file
4) You open a new tab and set the URL to a server script which accepts 
the ID as a parameter
5) The server sends the XML file to the client (maybe with a HTTP which 
forces the browser to show the "Save as" dialog

A client-oriented solution would be to use an Iframe (which provides 
also an own document) and push the XML (formatted as HTML) into the 
document's body. This has the drawback that you have to show an iframe 
inside your application and the user has to right-click at the content 
to save it.

Hope this helps,
   Alex


> -----Original Message-----
> From: Alexander Back [mailto:[email protected]] 
> Sent: Friday, December 12, 2008 10:41 AM
> To: qooxdoo Development
> Subject: Re: [qooxdoo-devel] New browser tab
> 
> Hi Anthony,
> 
> Mayhall, Anthony J. (MSFC-NNM08AA21T)[TBE 01] wrote:
>> I was hoping to use the qx api to put objects in the new window.  If I
> 
>> do newwindow=window.open(), can I use newwindow.document.getRoot() to 
>> add objects to it?
> No, this won't work because qooxdoo has to be fully loaded inside this
> new document.
> 
> "newwindow.document.getRoot()" simply does not exist. You have to setup
> a whole application in that new window to make use of the "getRoot" and
> other widgets.
> 
> So what's your exercise? What do you like to achieve? Maybe there's
> another way to solve it.
> 
> cheers,
>    Alex
> 
>> -----Original Message-----
>> From: Alexander Back [mailto:[email protected]]
>> Sent: Friday, December 12, 2008 9:05 AM
>> To: qooxdoo Development
>> Subject: Re: [qooxdoo-devel] New browser tab
>>
>> Hi Anthony,
>>
>> welcome to the qooxdoo project!
>>
>> Mayhall, Anthony J. (MSFC-NNM08AA21T)[TBE 01] wrote:
>>> If I open a new tab in Firefox from within my javascript, how do I 
>>> get
>>> qx to use it?
>> qooxdoo (and every other JS-framework) are loaded into your document 
>> and have control over this document (access the DOM etc.). If you are 
>> opening another tab (I assume by "window.open()") you are creating a 
>> new document which you can access, but if you like to qooxdoo inside 
>> this new document you have to load qooxdoo into this document.
>> This is probably not you want to achieve, so we should figure out if 
>> there's another way.
>>
>> What do you exactly like to achieve in your new tab? Is is necessary 
>> to have a qooxdoo application running inside this new document or do 
>> you only need access to it?
>>
>> cheers,
>>    Alex

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to