Forums

[resolved] Tweaking html for a download button, tool tip and file link (3 posts)

  1. perrynz
    Member
    Posted 1 year ago #

    Objective

    To replace (and remove) the default word Download
    with a nice download graphic button, with the same
    response to a click on {filelink=15} I.e. takes
    the user to same pop-up javascript download window.

    -------------------------------------------------------

    ==Present html======================================

    {filelink=15}
    
    [caption id="attachment_434" align="aligncenter" width="300" caption="12 Fancy Frame PS Brushes"]<a href="http://blackcatsgraphics.com/wp-content/uploads/2011/04/Fancy-Frames-pic.jpg"><img class="size-medium wp-image-434" title="Click for Larger Image" src="http://blackcatsgraphics.com/wp-content/uploads/2011/04/Fancy-Frames-pic-300x300.jpg" alt="" width="300" height="300" /></a>[/caption]

    ---------------------------------------------------------

    For a user {filelink=15} renders on the page as the hyper-linked word: Download

    On the page, copying the embedded link under Download to the clipboard shows it as: http://blackcatsgraphics.com/freebies/brushes/#

    However

    Clicking on the word: Download

    generates a download (javascript?) window with the URL: http://blackcatsgraphics.com/freebies/brushes/?download=15

    By inspecting the page element, this is revealed:

    <a href="#" onclick="javascript:window.open("/freebies/brushes/?download=15","Window1","menubar=no,width=400,height=200,toolbar=no, left="+((screen.width/2)-200)+", top="+((screen.height/2)-100));return false;" style="background:url('http://blackcatsgraphics.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a>

    So I need (I think) to add this html somwhere:

    <img src="http://blackcatsgraphics.com/wp-content/uploads/2011/04/download-btn-02-hover.png" title="Free Download" /></a>

    but somehow nest the javascript html (above) in it. Or vice-versa.

    Then - if successful - I can remove the word Download from the download link label pane in the file manager - right?
    And tweak the position of the download button as desired.

    I have tried, but only two thirds success. I get the pretty download button
    and it contains the tool tip and the mouse pointer changes to a hand, BUT
    a click gets nothing. I.e. clicking the download button does not invoke
    the javascript for the download window.

    So I'd combined the two bits of html wrongly, I presume? Or something else, less obvious?

  2. perrynz
    Member
    Posted 12 months ago #

    After a crash course in xhtml, I've got the problem 95% licked.

    Please have a look at the results, here.

    The last elusive piece is to get that download button more
    or less centred above the pix. align="middle" doesn't work.
    Would it be over-ridden by a style sheet setting, perhaps?

    Something else?

  3. perrynz
    Member
    Posted 12 months ago #

    Got it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags