Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2003, 03:52 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default Load a pdf when the URL is typed?

When a user types my URL the main page loads, which is fine. But what I want to do is type www.mysite.com/otherpage and load a PDF file into the browser(without actually type file.pdf after the URL) and by pass the page I have now with the link to the PDF on it. So the secondary page never loads. Also can the code do a check to see if the user has Acrobat reader and if not can it direct them to adobe.com. Any help on this matter would be awesome.
Thanks a lot!!!!

__________________
-----------------------------------------------------------
\"Don\'t follow someone who\'s not going anywhere\" John Mason
Reply With Quote
  #2 (permalink)  
Old November 13th, 2003, 03:59 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try
<%
    Response.Redirect "http://www.something.com/some.pdf"
    'where http://www.something.com/some.pdf is the path to your pdf
%>
Reply With Quote
  #3 (permalink)  
Old November 13th, 2003, 04:11 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the quick response, but when I use your code it comes up and says page cannot be displayed. But it's looking for
http://www.something.com/some.pdfhtt...g.com/some.pdf
why is it adding the url to the url. What page do I use the Redirect on? maybe I am doing something wrong

Reply With Quote
  #4 (permalink)  
Old November 13th, 2003, 04:16 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay sorry it works fine, thanks a lot!! :-)
Just one more thing what happens if the user dose not have acrobat reader???

Reply With Quote
  #5 (permalink)  
Old November 13th, 2003, 04:19 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would guess they either get gibberish or an error. I am not sure.
Reply With Quote
  #6 (permalink)  
Old November 13th, 2003, 04:31 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry the keep bothering you, but how do I make it load in another window, I tried the target="_blank" but that didn't seem to work.

Reply With Quote
  #7 (permalink)  
Old November 13th, 2003, 04:32 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If they don't have an application to handle a file format, they will get the "Download file..." dialog box.

Peter
------------------------------------------------------
Work smarter, not harder.
Reply With Quote
  #8 (permalink)  
Old November 13th, 2003, 04:35 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try

<SCRIPT>
     Window.open("http://www.something.com/some.pdf")
<SCRIPT>
Reply With Quote
  #9 (permalink)  
Old November 13th, 2003, 04:43 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help :)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handler to read and load a PDF file Mehdi6002 ASP.NET 2.0 Professional 0 May 8th, 2007 04:39 PM
Load picture from url rokujou Beginning VB 6 0 March 5th, 2007 07:08 AM
XMLDOM to load from URL?? lian_a Classic ASP XML 0 January 19th, 2005 10:15 PM
Load image from URL JonnyRPI ASP.NET 1.0 and 1.1 Basics 0 June 9th, 2003 06:41 PM



All times are GMT -4. The time now is 02:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.