Solved

ASP and RTF creation

Posted on 2004-08-05
3
175 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

Suggested Solutions

Title # Comments Views Activity
Syntax for query to update table 2 39
Executing a script on a timer online 5 32
ASP and Extracting XML 7 24
Use Mid in Html 6 21
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 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/…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

735 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