Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - IE8 problem with HTA

Reply
 
Old 07-22-2009   #1 (permalink)
Tom Lavedas


 
 

IE8 problem with HTA

I made the mistake of loading IE8 when I updated an old machine to XP
a couple of weeks ago. Now an number of HTAs have failed and I can't
figure out how I might be able to get them working again. It's
probably a security thing, but here's hoping someone out there is able
to shed some light.

The problem arises with the use of an IFrame as a drop target for
local files. The following approach used to allows dropped files to
load in the frame. Then the path to that file could be retrieved with
the location.href property in previous version of the mshta - before
IE8.

<html>
<head>
<!-- Mimic Internet Explorer 5 -->
<meta http-equiv="X-UA-Compatible" content="IE=IE5" >
<title>DandD Test</title>

<script language=vbScript>

sub GetDropPath
if MyIFrame.document.readystate = "complete" then
display MyIFrame.location.href
end if
end sub

sub Display(sText)
document.all.debug.insertAdjacentHTML "afterbegin", sText & "<br>"
end sub

</script>

</head>
<body>
<iframe name=MyIFrame onreadystatechange=GetDropPath
application="yes" style="height:400px;width:400px"
src='about:<body title="Drop file here">File goes here</body>'>
</iframe>
<div id=debug></div>
</body>
</html>

This little example just shows the problem. When run on systems with
IE before 8, it displays the dropped content (say text and images -
other files if the EditFlags registry setting is hacked) and its URL.
Under IE8 it does not let the content load and the URL is always
"about:blank", though it acts as if it is loading.

I tried setting the compatibility mode to an earlier version, but it
has no effect.

Anyone got an idea?

TIA,

Tom Lavedas
***********

My System SpecsSystem Spec
Old 07-22-2009   #2 (permalink)
mayayana


 
 

Re: IE8 problem with HTA

I don't know whether this will help, but you
can try it if you don't get your code working.

www.jsware.net/jsware/scripts.php5#picview

I was making a thumbnail viewer recently for
a friend and wanted actual drag-drop functionality
for files and folders in an HTA. I decided to just
make a small control for the job. (I don't understand
why Microsoft never provided drag-drop, since HTAs
bypass security restrictions anyway.)

The control I ended up making is very basic. You
assign an image of any size to it. The image can be
designed to make the control into a button, or you can
use something like a picture of a bucket, or anything else.
The control auto-sizes to any image.

When something is dropped an OnDrop event returns the
path and whether it's a file or folder. There's also an
onClick event and a tooltip property.
That's about it. I just wanted something small, simple
and flexible that would do the job.

Quote:

> I made the mistake of loading IE8 when I updated an old machine to XP
> a couple of weeks ago. Now an number of HTAs have failed and I can't
> figure out how I might be able to get them working again. It's
> probably a security thing, but here's hoping someone out there is able
> to shed some light.
>
> The problem arises with the use of an IFrame as a drop target for
> local files. The following approach used to allows dropped files to
> load in the frame. Then the path to that file could be retrieved with
> the location.href property in previous version of the mshta - before
> IE8.
>
> <html>
> <head>
> <!-- Mimic Internet Explorer 5 -->
> <meta http-equiv="X-UA-Compatible" content="IE=IE5" >
> <title>DandD Test</title>
>
> <script language=vbScript>
>
> sub GetDropPath
> if MyIFrame.document.readystate = "complete" then
> display MyIFrame.location.href
> end if
> end sub
>
> sub Display(sText)
> document.all.debug.insertAdjacentHTML "afterbegin", sText & "<br>"
> end sub
>
> </script>
>
> </head>
> <body>
> <iframe name=MyIFrame onreadystatechange=GetDropPath
> application="yes" style="height:400px;width:400px"
> src='about:<body title="Drop file here">File goes here</body>'>
> </iframe>
> <div id=debug></div>
> </body>
> </html>
>
> This little example just shows the problem. When run on systems with
> IE before 8, it displays the dropped content (say text and images -
> other files if the EditFlags registry setting is hacked) and its URL.
> Under IE8 it does not let the content load and the URL is always
> "about:blank", though it acts as if it is loading.
>
> I tried setting the compatibility mode to an earlier version, but it
> has no effect.
>
> Anyone got an idea?
>
> TIA,
>
> Tom Lavedas
> ***********

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
the problem with ndis.sys Blue Screen of Death problem solved? Vista General
Re: Windows Mail Attachement Problem and Adobe Player Problem with IE8 Vista mail
Multi-select problem in Windows Explorer BIG PROBLEM!!!!!! Vista General
Generic McAfee Problem Message in Vista Problem Reports Vista performance & maintenance
Vista Upgrade Problem - Windows Explorer Loop problem Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46