[Twisted-web] Nevow-Stan How to save file?

Suha Onay suhaonay at gmail.com
Tue Mar 11 12:31:06 EDT 2008


Hi,

I am a newbie of nevow. I want to open a save as dialog and enable the user
to save files.
I tried to use javascript with a href link but with no success.
I write:

"""
...
file =3D open('fifo.txt', 'w')
file.write('smth')
file.close()

return [
    T.a(href=3D"fifo.txt", onclick=3D"saveFile('fifo.txt')")['Save'],
    webform.renderForms()[FORM_LAYOUT],
]

"""
How can I achieve in this?
How can I give a link to a file in the server without nevow_carryover
repling the request?

Suha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20080311/89=
3ead68/attachment.htm


More information about the Twisted-web mailing list