of course: since javascript cannot write files (if you want to do that: try
vbscript), you pass the value you want to save into a file to a servlet. if
you want to save the file on the server side you simply use a FileWriter,
FileOutputStream,... , if you want the want the file to be written on the
client machine you let the servlet write the value out to the client and set
the content-type to sth. the browser can't display directly: a dialog which
lets the user save the file pops up.
hope this helps!
-mw
----- Original Message -----
From: "Krishnamurthy, Balaji" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 5:47 PM
Subject: Saving into File
> Hello:
>
> Is there any way we can save the return value of a Javascript function
into
> a file. For e.g.
>
> function function_that_returns_content_of_a_file()
> {
> return "the contents";
> }
>
> ...
>
> // code down here which will invoke the script and save the content on
some
> user action (may be button / link)
>
> Thanks
> Balaji
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html