www.webdeveloper.com
Results 1 to 7 of 7

Thread: drag-droppable image-link on OS X

  1. #1
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120

    drag-droppable image-link on OS X

    Hello,

    We have a link on our site with the instructions, Drag the following link to your desktop or favorites bar for quick access to X. The link is basically structured like so:

    HTML Code:
    <a href='/somepage'>
      <img src='/images/quick-access-logo.png' />
    </a>
    This works perfectly fine in Windows. You drag the link to the desktop, and it places a shortcut, pointing to http://mysite.com/somepage on the desktop. In Safari and Chrome (have not tested FF), it simply saves quick-access-logo.png to the desktop.

    Any thoughts on how to make this function correctly in OS X?

    My current thought is to make the image a background. But, I'd like to avoid going down that road if there's some attribute or indication that'll make this just work!

    Thanks!
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  2. #2
    Join Date
    Aug 2006
    Posts
    301
    the issue is that some browsers assume that you are trying to save a copy of the image by default, try using a background image, or better yet asking the user to right click and copy shortcut or add to favorites/bookmarks from the right-click menu
    Last edited by bsmbahamas; 06-22-2012 at 02:54 PM.

  3. #3
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Thanks for the feedback.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  4. #4
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    For this shortcut, it would also be ideal if we can specify (or "suggest") the image to use for the icon.

    Anyone know whether [and how] this can be done?

    It doesn't appear to be using the favicon, which is assigned to the shortcut when dragged to the favorites bar. And when the image was located inside the anchor tag, OS X browsers exhibited the issue in the OP. Maybe there's a trick with background images, special attributes, or link tags?
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  5. #5
    Join Date
    Aug 2006
    Posts
    301
    as far as i know, as long as you copy the link to your desktop using right-click, or just drag it over, it should use your favicon as long as your favicon normally works when you book mark your site otherwise. so if your favicon appears normally when you bookmark it should also work when you drag and drop or copy-shortcut/paste-shortcut, in my experience though sometimes it works and sometimes it doesn't, even with big sites like google and youtube and yahoo, it sometime works and sometimes don't

  6. #6
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Thanks for the feedback again -- no dice though. I've found several sources that correlate with what you're saying, some including charts to indicate which browsers will do what with the favicon. Unfortunately, these charts appear to be outdated. I can't, for the life of me, get any browser on either system to use the favicon for the desktop shortcut. (Works in the browser's links bar and favorites menu.)

    If there's some subtlety I may be missing, hopefully someone can point it out.

    My employer is very picky and detail-oriented. I've even gone so far as to creating an inline, data-uri shortcut "file" on the fly. In the scenarios I've attempted so far, I can get the shortcut file to drag-drop successfully (on windows), but designated icon still fails to show. (Maybe the image can be embedded in the shortcut file?)

    Thanks,
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  7. #7
    Join Date
    Aug 2006
    Posts
    301
    i know right? blame the browser makers and o/s makers i guess.

    i'm stuck at work using IE7 and the shorcut to this page has an image shortcut:

    the actual code in the shortcut is:

    [InternetShortcut]
    URL=http://www.webdeveloper.com/forum/showthread.php?p=1212711#post1212711
    IDList=
    IconFile=http://www.webdeveloper.com/favicon.ico
    IconIndex=1
    [{000214A0-0000-0000-C000-000000000046}]
    Prop3=19,2

    so it appears that the iconfile line may be the way, but i'm not sure how to embed that into the link, if you can find a solution please post it, otherwise you may need to explain to your boss that pixel perfection and stuff like this is hard to do(at least the first time you need to do it), and explain that the browsers all do their own thing and some can't do it at all - provided you can show him something to support this case

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles