Re: [Xsltforms-support] Are Load & Save implemented?
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-09-17 07:10:44
|
Hello Lorenzo, >> Because XSLTForms is based on Javascript, it is not allowed by any browser >> to read or save local files. Only plug-ins and extensions can do that. >> > > Also if javascript asks the browser to open the default "save as..." window? > This is possible for just Internet Explorer and can be added to XSLTForms for it only. For other browsers, there is a known trick consisting in sending all the data to the server then back to the client with a specific header forcing the client to display the save as dialog. Because of the cross-domain constraint, this cannot be done by a local HTTP server if the initial form comes from another HTTP server. It can be solved using a local proxy instead ! > >> Coupled with a specific proxy (to be developed...), this could be done. Do >> you know a user case for which it is required ? >> > > Off-line xforms can be used for to-do-lists, file conversions, file editing... > Yes, local applications are not dead and I developed a tiny HTTP server (named tXs) just for that because browsers don't treat local files with less security constraints. I, now, think that it would be even better to transform this program as a proxy... > What about the upload button? is it implemented? > No, it is not yet implemented because it's not very easy with HTML forms and Javascript and because XForms recommendation says that the content can be embedded in an instance, not just the selected filename. Another server page could do the trick... or a local proxy (did I say that already ? ;-) ) ... Best regards, -Alain |