loading pdf

liunx

Guest
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?<br />
<br />
<html> <br />
<head> <br />
<title>monthly specials</title> <br />
</head> <br />
<br />
<br />
<body> <br />
<div align="center"> <br />
<script language="JavaScript"> <br />
function goToUrl(){ <br />
window.location = "http://Template/documents/salesflier.pdf"; } <br />
</script> <br />
</div> <br />
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif"> To View <br />
the online specials click on the link below </font></p> <br />
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif">You do need <br />
Adobe Acrobat Reader </font></p> <br />
<p align="center">If you need Adobe Reader you may Download <!--more--> it here for free from <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.adobe.com/products/acrobat/readstep2.html">Adobe</a>.</p> <br />
<form action="/Template/documents/salesflier.pdf"> <br />
<div align="center"> <br />
<input name="button" type="button" onClick="goToUrl()" value="Sales Flier"> <br />
</div> <br />
</form> <br />
<br />
<br />
</div> <br />
</body> <br />
</html> <br />
<br />
thanks in advanced<!--content-->Using something like this should help keep your pages accessable:<br />
<br />
<form action="http://www.w3c.org" method="post"><br />
<p><input type="submit" value="Load Page"></p><br />
</form>Just swap out the url for the W3C with the path to your PDF file.<!--content-->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, <br />
<br />
<br />
<br />
<html><br />
<head><br />
<title>monthly specials</title><br />
</head><br />
<br />
<br />
<body><br />
<div align="center"><br />
<br />
</div><br />
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif"> To View <br />
the online specials click on the link below </font></p><br />
<p align="center"><font size="4" face="Arial, Helvetica, sans-serif">You do need <br />
Adobe Acrobat Reader </font></p><br />
<form action="/Template/documents/salesflier.pdf" method="post"><br />
<p><input type="submit" value="Load Page"></p><br />
</form> <br />
<!-- <div align="center"><a href=http://www.webdeveloper.com/forum/archive/index.php/"/Template/documents/salesflier.pdf" target="_self"> <br />
Sales Flier</a><br />
</div> --><br />
<p align="center">If you need Adobe Reader you may Download <!--more--> it here for free from <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.adobe.com/products/acrobat/readstep2.html">Adobe</a>.</p><br />
<br />
</div><br />
</body><br />
</html><!--content-->Can I see the direct link to the PDF file (ie. <!-- m --><a class="postlink" href="http://www.yourdomain.com/dir1/dir2/file.pdf">http://www.yourdomain.com/dir1/dir2/file.pdf</a><!-- m -->) and the direct link to the page calling the PDF (ie. <!-- m --><a class="postlink" href="http://www.yourdomain.com/dir1/yourpage.htm">http://www.yourdomain.com/dir1/yourpage.htm</a><!-- m -->) please?<!--content-->the whole webpage is mincopc.com<br />
i am using js for my navigation. to get the salesflier is just to click on the online sales and then current specials<br />
<br />
as for the pdf it is located in the documents folder which is in the template folder, which lies within in the root folder.<!--content-->Originally posted by tlavalle <br />
i am using js for my navigation.I hope you have a backup for the users who have javascript disabled...<br />
<br />
Anyway, try this:<br />
<br />
<form action="http://www.mincopc.com/Template/documents/salesflier.pdf" method="post"><br />
<p><input type="submit" value="Load Page"></p><br />
</form><!--content-->I think i am just going to leave it as a link, it just doesn't want to find my file.<br />
<br />
the form button when clicked just comes and the error comes up telling me to check the address.<br />
<br />
<br />
thanks for the help<!--content-->
Originally posted by pyro <br />
I hope you have a backup for the users who have javascript disabled...<br />
<br />
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.<!--content-->You could tell them about the WIA (Web Accessibility Initiative)<br />
<br />
<!-- m --><a class="postlink" href="http://www.w3.org/WAI/">http://www.w3.org/WAI/</a><!-- m --><!--content-->I was able to get the flier ok... <!-- m --><a class="postlink" href="http://www.mincopc.com/Template/documents/salesflier.pdf">http://www.mincopc.com/Template/documen ... sflier.pdf</a><!-- m --><br />
<br />
However my 2 cents would be to make the flier open in a new window and not on self.<br />
<br />
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.<!--content-->
 
Back
Top