Solved

ASP and RTF creation

Posted on 2004-08-05
3
174 Views
Last Modified: 2006-11-17
Hello,

Now, for the record, my RTF creation script works fine, but what I used to do at the end of the script is usually just a simple "Response.Redirect" to some other page which would contain a link to the document which was just created (thus allowing the user to right-click and choose save target as..).

I was wondering is it possible to open the document in a new window straight after the script has been run (so the user can view it and choose to save it if they want).

Any help would be appreciated
0
Comment
Question by:Sebastion
  • 2
3 Comments
 
LVL 9

Expert Comment

by:leechoonhwee
ID: 11732627
Response.Write("<script>window.open("PageName.asp?File=Filename","FrameName")</script>")
0
 

Author Comment

by:Sebastion
ID: 11732707
leechoonhwee,

First, that code is missing some quotations, I'd imagine it would read:

Response.Write("<script>window.open(""PageName.asp?File=" & FilePath & ",""FrameName"")</script>")

Where, FilePath = the fullpath and name of the file that was just created in the script.  I assume that this was the only variable I had to change?  The end result that I recieved was a blank page (no window opened).

Could you give a little more detail about what I'm supposed to change.  Am I required to make a new page called PageName (or whatever I want to call it)?  If so, I have no idea what to put on this page.

Thanks in advance
0
 
LVL 9

Accepted Solution

by:
leechoonhwee earned 100 total points
ID: 11732747
LOL...Sorry for the confusion..Let me explain as I might have given the wrong example.

You have already saved a file called file.txt in a directory called Doc (for example)

So you need to do a

Filestr = Server.Mappath & "./Doc/" & Filename

Response.Write("<script>window.open("& Filestr &","FrameName")</script>")

This will open up the document in a new window.

I am so sorry for the confusion cuz the code given was from my own code library!!! So sorry.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question