Infinity_ends Posted April 29, 2005 Share Posted April 29, 2005 If anyone could help me with all or any part of this I would be most grateful. I have made a new box in the righthand column of my site where I wish to place a picture, which when clicked, will download a pdf file. or if that is not possible, take you to a pop up html page where you can down load a pdf file. (I'm not wanting people to pay for this download) Firstly I don't know how to put a picture in there, how do I put a link on a picture and thirdly can I make the picture be a download button. Link to comment Share on other sites More sharing options...
Guest Posted April 29, 2005 Share Posted April 29, 2005 <A HREF='your.pdf'><IMG SRC='your_image.gif' ALT='Your alternate text' WIDTH='100' HEIGHT='100'></A> heres the stripped code for a picture link, just direct it to your pdf and it will automatically download/open it...place your values in place of the sample values and put it in your box script Link to comment Share on other sites More sharing options...
Infinity_ends Posted April 29, 2005 Author Share Posted April 29, 2005 Thanks for the swift reply Jemlin1. I tried doing what you said, but I can't have gotten it right. it errors. Even though you mae it so clear. Here's the code I used, can you see what I did wrong. ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => 'Catalogue PDF'); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => 'Click on the picture to download a PDF file of the Quintessence Catalogue.'); <A HREF='http://www.quintessencepublishing.co.uk/images/quintcat.pdf'> <IMG SRC='http://www.quintessencepublishing.co.uk/images/catalog_pdf.jeg' ALT='PDF Catalogue' WIDTH='100' HEIGHT='139'></A> new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Link to comment Share on other sites More sharing options...
Infinity_ends Posted April 29, 2005 Author Share Posted April 29, 2005 It's not the fact that I typed jep where I should have typed jpeg, I have corrected that now. the error message I got was Parse error: parse error in D:\websites\quintessencepublishing.co.uk\wwwroot\catalog\includes\boxes\downloadit.php on line 20 Link to comment Share on other sites More sharing options...
Winterchild Posted April 29, 2005 Share Posted April 29, 2005 You can't place HTML in PHP like that. try $info_box_contents = array(); $info_box_contents[] = array('text' => 'Click on the picture to download a PDF file of the Quintessence Catalogue.'); echo("<A HREF='http://www.quintessencepublishing.co.uk/images/quintcat.pdf'> <IMG SRC='http://www.quintessencepublishing.co.uk/images/catalog_pdf.jeg' ALT='PDF Catalogue' WIDTH='100' HEIGHT='139'></A>"); new infoBox($info_box_contents); ?> Forum search Contributions search Documentation search (note: docs being adapted for MS3, may be different for MS2) 3 tips for better forum searching Want to post? Read this first: osCommerce for dummies Topic name etiquette Basics: Basics for design Right syntax to use near '-20, 20' Cannot re-assign $this Parse error Link to comment Share on other sites More sharing options...
Infinity_ends Posted April 29, 2005 Author Share Posted April 29, 2005 Absolutely perfect! I can't thank you enough Winterchild. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.