Click to See Complete Forum and Search --> : loading pdf


tlavalle
08-06-2003, 11:59 AM
I have a question I am trying to load a pdf with a button, the file is stored on the server. but every time you click on the button it says can't find file or url is wrong . here is my code can you guys look at it and give a little help?

<html>
<head>
<title>monthly specials</title>
</head>


<body>
<div align="center">
<script language="JavaScript">
function goToUrl(){
window.location = "http://Template/documents/salesflier.pdf"; }
</script>
</div>
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif"> To View
the online specials click on the link below </font></p>
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif">You do need
Adobe Acrobat Reader </font></p>
<p align="center">If you need Adobe Reader you may download it here for free from
<a href="http://www.adobe.com/products/acrobat/readstep2.html">Adobe</a>.</p>
<form action="/Template/documents/salesflier.pdf">
<div align="center">
<input name="button" type="button" onClick="goToUrl()" value="Sales Flier">
</div>
</form>


</div>
</body>
</html>

thanks in advanced

pyro
08-06-2003, 12:25 PM
Using something like this should help keep your pages accessable:

<form action="http://www.w3c.org" method="post">
<p><input type="submit" value="Load Page"></p>
</form>Just swap out the url for the W3C with the path to your PDF file.

tlavalle
08-06-2003, 12:52 PM
ok here is what uis looks like now but same thing it just says can't find the file. did I enter the path to the file correctly,



<html>
<head>
<title>monthly specials</title>
</head>


<body>
<div align="center">

</div>
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif"> To View
the online specials click on the link below </font></p>
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif">You do need
Adobe Acrobat Reader </font></p>
<form action="/Template/documents/salesflier.pdf" method="post">
<p><input type="submit" value="Load Page"></p>
</form>
<!-- <div align="center"><a href="/Template/documents/salesflier.pdf" target="_self">
Sales Flier</a>
</div> -->
<p align="center">If you need Adobe Reader you may download it here for free from
<a href="http://www.adobe.com/products/acrobat/readstep2.html">Adobe</a>.</p>

</div>
</body>
</html>

pyro
08-06-2003, 12:55 PM
Can I see the direct link to the PDF file (ie. http://www.yourdomain.com/dir1/dir2/file.pdf) and the direct link to the page calling the PDF (ie. http://www.yourdomain.com/dir1/yourpage.htm) please?

tlavalle
08-06-2003, 01:05 PM
the whole webpage is mincopc.com
i am using js for my navigation. to get the salesflier is just to click on the online sales and then current specials

as for the pdf it is located in the documents folder which is in the template folder, which lies within in the root folder.

pyro
08-06-2003, 01:08 PM
Originally posted by tlavalle
i am using js for my navigation.I hope you have a backup for the users who have javascript disabled...

Anyway, try this:

<form action="http://www.mincopc.com/Template/documents/salesflier.pdf" method="post">
<p><input type="submit" value="Load Page"></p>
</form>

tlavalle
08-06-2003, 01:14 PM
I think i am just going to leave it as a link, it just doesn't want to find my file.

the form button when clicked just comes and the error comes up telling me to check the address.


thanks for the help

tlavalle
08-06-2003, 01:18 PM
[QUOTE]Originally posted by pyro
[B]I hope you have a backup for the users who have javascript disabled...

I am just an intern they had most of the webpage in place I am trying to clean and finish their online catalog. there isn't much choice as for on what i can and can not do.

pyro
08-06-2003, 08:58 PM
You could tell them about the WIA (Web Accessibility Initiative)

http://www.w3.org/WAI/

Compguy Pete
08-07-2003, 06:34 PM
I was able to get the flier ok... http://www.mincopc.com/Template/documents/salesflier.pdf

However my 2 cents would be to make the flier open in a new window and not on self.

Since it looks like your updating I would say to make a temp design that has a link to the flier and just say the site is down and have the user leave their email address and email them once the site is up and finished.