Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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
 
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
%>
 
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

 
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???

 
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.
 
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.

 
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.
 
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>
 
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 :)





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





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