-
Saving a file as HTML
Hi!
Could you please help us out with this...
How can we save a dynamically generated report,viewed in a browser, as an
"HTML file" on to our server(Win NT).
We are working with Coldfusion which is same as ASP as far as logic comes.
We want to code it and not use 'save as' from the browser.
Thankyou
Have a nice day.
Ila Singh
-
Re: Saving a file as HTML
There are many of ways of doing this. One way is that you can create a session
variable that will contain the HTML string. And then instantiate the File
Scripting Object, to store the HTML on the server. On your page that you
buffer out to the client have a link to the file it created. You can use
the Session ID to name the file to make sure it is Unique. Now comes the
act of removing the file from the server when the Client leaves. With IIS
the default time for a session variable to time out is 20 mins, you can Bypass
this Explicitly by setting its session.timeout at page level, also if you
wish to kill the session you could call the .abandit method or change the
IIS time out on the server. Now when the Session Times out or gets abandoned
the Session_OnEnd is called. Using the Global.asa file code the Session_OnEnd()
Sub and deallocate the FSO.
I Hope this was a help sorry for a brief explanation on one way to do this.
Also know that using the Session Object requires the Client to have Cookies
turned on.
<CFML OUTPUT>
-Rich
:P
</CFML OUTPUT>
"ILA SINGH" <isingh@businessedge.com> wrote:
>
>Hi!
>Could you please help us out with this...
>How can we save a dynamically generated report,viewed in a browser, as an
>"HTML file" on to our server(Win NT).
>
>We are working with Coldfusion which is same as ASP as far as logic comes.
>
>We want to code it and not use 'save as' from the browser.
>Thankyou
>Have a nice day.
>Ila Singh
>
-
Re: Saving a file as HTML
You can read the html from javascript and send it back
- within the TEXT of a <FORM>
- or in the the QueryString (if it is not too long).
NOTE: You should replace all the gremlins (carriage returns, spaces and tabs
etc) before sending
to the server, and then undo them back to their original on the server.
Check the attachment for an example to see how to read the HTML in IE.
(The attributes buttons is irrelevant).
In NS you need to use java. Much more complicated!
ILA SINGH wrote:
> Hi!
> Could you please help us out with this...
> How can we save a dynamically generated report,viewed in a browser, as an
> "HTML file" on to our server(Win NT).
>
> We are working with Coldfusion which is same as ASP as far as logic comes.
>
> We want to code it and not use 'save as' from the browser.
> Thankyou
> Have a nice day.
> Ila Singh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks