Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Turn "Title=" into HREF to link to .pdf

Posted by: rcanpolat Sep 6 2011, 02:37 PM

Hi,

I've bought a template for a site I'm building. I've almost got the entire thing all finished but i'm at a bit of a road block. The site is quite heavy on different css sheets & js so its a bit of a mess trying to navigate around to put in my own code so I'm wondering is there a simple way around this.

Basically as you can see from my code below i've got a Gallery on the site. The gallery pre loads images and then displays them. In this case it pre loads "granite_cleaning.jpg"

On hover a little black box slides up displaying the text "Granite Worktop (Clean & Re-Seal)"

On click of the image or js slider it loads a lightbox onto the page displaying the image "STORAC01.jpg" along with a fancy "close" icon, and a fancy "next / previous" button

The text "CLICK HERE TO DOWNLOAD AND PRINT" is shown below the image on the left on the lightbox. Basically i would like to turn that text into a hyperlink where i can link it to a .pdf where a user can print a voucher. Problem is that "title=" is already part of the "<a href=" line of code.

Is there any simple way i can do this? Im talking like to slap a bit of code directly into the html without having to sift through the css sheets and html. There are about 5 different stylesheets being used for different purposes along side a bucket load of js.

CODE

<li>
<a href="gallery/offers/vouchers/STORAC01.jpg" title="CLICK HERE TO DOWNLOAD AND PRINT" rel="prettyPhoto[gallery2]">
<img src="gallery/offers/granite_cleaning.jpg" width="290" height="153" alt="" />     
<span class="cover boxcaption">
<span class="prjname">Granite Worktop (Clean & Re-Seal)</span>                                
<span class="gall"></span>                                                
</span>
</a>
</li>


I hope I'm making sense

Posted by: Christian J Sep 6 2011, 05:49 PM

QUOTE(rcanpolat @ Sep 6 2011, 09:37 PM) *

Problem is that "title=" is already part of the "<a href=" line of code.

I don't understand. unsure.gif

Posted by: rcanpolat Sep 6 2011, 06:05 PM

Basically what i would like to do is this

Original line of code:

CODE
<a href="gallery/offers/vouchers/STORAC01.jpg" title="CLICK HERE TO DOWNLOAD AND PRINT" rel="prettyPhoto[gallery2]">


What i want to do:

CODE
<a href="gallery/offers/vouchers/STORAC01.jpg" title="CLICK HERE TO DOWNLOAD AND PRINT" ****When somebody clicks on the text "Click Here To Download & Print i want it to hyperlink to a pdf**** rel="prettyPhoto[gallery2]">


Make sense now? Or should i make a video? laugh.gif

Posted by: Darin McGrew Sep 6 2011, 07:03 PM

You can't do that using the title attribute.

What you're doing sounds more like a drop-down menu than a tooltip. For example:
http://meyerweb.com/eric/css/edge/menus/demo.html
http://www.alistapart.com/articles/dropdowns/

Posted by: rcanpolat Sep 6 2011, 07:12 PM

I was thinking about using inline content instead with pretty photo js but now i can't seem to be able to embed an inline photo. it just becomes like a slide show on my pre loader

is there any other way to embed images without using src? Say some basic javascript that wouldn't conflict?

Posted by: rcanpolat Sep 7 2011, 05:23 AM

Found a work around. I know i'll be shot for saying this but iframe's done the trick

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)