Solved

ASP and RTF creation

Posted on 2004-08-05
3
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

740 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