Solved

ASP and RTF creation

Posted on 2004-08-05
3
172 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
Comment Utility
Response.Write("<script>window.open("PageName.asp?File=Filename","FrameName")</script>")
0
 

Author Comment

by:Sebastion
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now