Re: Drag from SP2 window to desktop?

From: Eric Lawrence [MSFT] (e_lawrence_at_hotmail.com)
Date: 11/11/04


Date: Thu, 11 Nov 2004 12:25:26 -0800

Heh... I had exactly this problem with an internal tool I wrote. ;-)

The simplest solution is to cheat, as you noted:

> Then I could have a page on my site (@ www.maximized.com) which would
> display the same help text as originally displayed by the javascript
alert.
> This solution is inferior to the original solution, IMHO, but at least it
> would still work. :)

This is what I did, and honestly, I'm not sure that it's really that
inferior.

You could also put a ONCLICK="alert('Drag to the VB
app');event.returnValue=false; return false;" on the <A> tag to help clear
it up.

There are some other approaches that might work (e.g. write a pluggable
protocol handler for a new VBAPPFILTER: protocol and then use the registry
override to permit drag and drop of that link type) but they're massively
overkill and could break in some future version of IE.

Sorry for the bad news; I feel your pain myself.

-- 
Thanks,
Eric Lawrence
Program Manager
Internet Explorer Trust
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ken Spreitzer" <ken@maximized.com> wrote in message
news:ecfOjc8xEHA.1400@TK2MSFTNGP11.phx.gbl...
> Hi, Eric.  Thanks for replying.  (Thanks to PA Bear, too.)
>
> Yep, I was afraid that was a change to close off a security hole.
>
> Here's what I'm trying to do.  I'm writing some software in VB6 which
> outputs HTML files.  Embedded within the HTML will be lines like this:
>
> 
> /somepage.htm
>
> or like this:
>
>  Google
>
> The idea is that if the user wants to perform a "filter" operation on one
of
> these lines, they can drag and drop the filter icon (which is surrounded
by
> the <a> javascript tag) onto my VB UI.  My VB program will look at the
> dropped text, and if it starts with "javascript:MyFunc(" then it knows how
> to decode the rest of the line and implement the specified filter.  This
is
> a great way for me to integrate filtering capabilities between the HTML
and
> my VB UI in a browser-neutral manner and without requiring an ActiveX
> control.
>
> Note that the other benefit to this system is that if the user doesn't
know
> what those filter icons in the HTML do, they can just click on them, and
> MyFunc will run:
>
> function MyFunc()
> {
>     alert("To filter on this value, just drag the filter icon to the VB
> program.");
> }
>
> It's a nice, elegant solution.  But now it's broken in SP2 (I understand
> why).
>
> Can you think of a workaround?  Is there something I can do to restore the
> ability to drag and drop a javascript <a> tag?  I've already embedded a
Mark
> of the Web into the HTML, but that doesn't seem to help.
>
> The obvious solution is to turn the trailing text (eg, "/somepage.htm")
into
> a link and have the user drag it instead of the filter image.  But in
> reality, the trailing text is already surrounded by another <a> tag (not
> shown in the examples above), used for another purpose.  So I can't do
that.
>
> The one solution I've considered is to change the <a> tag to something
like
> this:
>
> <a href="http://www.maximized.com/MyFunc.htm?Id=1&Value=/somepage.htm"
> target="_blank"><img src="filter.gif"></a>
>
> (I've only changed the <a> tag here, not the <img> or </a>.)
>
> Then I could have a page on my site (@ www.maximized.com) which would
> display the same help text as originally displayed by the javascript
alert.
> This solution is inferior to the original solution, IMHO, but at least it
> would still work.  :)
>
> So, do you know of any workaround to restore the original behavior?  Or,
> does another (better, hopefully!) solution occur to you (or anyone else!)?
>
> Much thanks,
> Ken
>
>
>
> "Eric Lawrence [MSFT]" <e_lawrence@hotmail.com> wrote in message
> news:%23p$xSN4xEHA.748@TK2MSFTNGP14.phx.gbl...
> > This was changed after SP2 released to fix a rather serious drag-drop
bug.
> > Please elaborate on what you're trying to accomplish and perhaps I can
> > help
> > you work around.
> >
> > -- 
> > Thanks,
> >
> > Eric Lawrence
> > Program Manager
> > Internet Explorer Trust
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
> > "Ken Spreitzer" <ken@maximized.com> wrote in message
> > news:#aCZo53xEHA.3840@tk2msftngp13.phx.gbl...
> >> Hi, all.
> >>
> >> I think that XP SP2 has changed this behavior.
> >>
> >> I used to be able to drag a JavaScript link from a web page to my
> >> desktop.
> >> That is, if an <a> link had an href="javascript:doSomething()" then I
> > could
> >> drag the link to the desktop.
> >>
> >> Now, after installing SP2, I can't.
> >>
> >> Has anyone else noticed this?  Is there any workaround?  It's very
> > important
> >> to a project that I'm working on.
> >>
> >> TIA,
> >> Ken
> >>
> >>
> >
> >
>
>


Relevant Pages

  • Re: Drag from SP2 window to desktop?
    ... Embedded within the HTML will be lines like this: ... they can drag and drop the filter icon (which is surrounded by ... just drag the filter icon to the VB ... > This was changed after SP2 released to fix a rather serious drag-drop bug. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Drag from SP2 window to desktop?
    ... >> display the same help text as originally displayed by the javascript ... > override to permit drag and drop of that link type) but they're massively ... >> to decode the rest of the line and implement the specified filter. ... >> a great way for me to integrate filtering capabilities between the HTML ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Web Editing on Mac
    ... TextEdit icon if you want to open it as a text file. ... drag the .html file to the TextEdit icon and TextEdit will display the ... but not such that you would be able to edit the html tags. ...
    (alt.html)
  • How to print html in python the normal way
    ... I wrote a simple filter as: ... when I use this filter in my template, it displays html as: ... I want to display as: ...
    (comp.lang.python)
  • RE: OWC 11.0 - Subtotals return incorrect values
    ... Drag "Product Categories" natural hierarchy into the page filter area. ... Basically the totals don't match. ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.olap)