IE "Mark of the Web" cross-frame scripting?

T

taoberly

A few months ago I posted a question about using a file on my hard
drive to perform cross-frame scripting and pull data from a server on
my company's intranet. I eventually got this working using an HTA file
and Internet Explorer.

Now I'm tackling a similar issue, but really need to keep the IE menus,
navigation buttons, etc. this time around. Assuming a solution exists,
I'm guessing it involves using the IE6 SP2 "Mark of the Web" feature.
Basically, I'm loading a local file that includes several
Javascript-powered buttons at the top, followed by an iframe that
claims the remaining 100% x 95% of the visible window and loads a page
from a web server on our intranet. The local HTML file includes a
"Mark of the Web" that matches this web server, and the server's domain
is stored at a "Trusted Site". So far, so good. The problem is that
when my script tries to access the page in the iframe, it doesn't
work...IE responds with an "Access is denied" error.

I haven't found very good documentation on the logic at work here, and
since I can't decide exactly where IE is getting hung-up, choosing a
next step is tricky. Is there some way around this? These company
PC's are partly locked-down, and as I'd also planned to give this HTML
file to coworkers, can't ask anybody to install new software or perform
major OS tweaks. Additionally, these PC's lack the real Windows XP
Service Pack 2, in favor of a mix of smaller updates and hotfixes, so
some of the new Internet Properties security features are missing
(assuming one might have helped).

I will keep experimenting and may eventually stumble on a solution as I
did previously, but I'd appreciate any suggestions. I think it's very
annoying that a file on my own hard drive can't simply do what it
wants. :-(

Thanks,

Todd
 
T

Tim Williams

Have you considered using a different approach such as automating an instance of IE using VB or VBA (eg. from excel?)

That typically does not suffer from the same restrictions as using javascript in another web page.
What type of process are you trying to automate in the "target" page ?

Tim
 
T

taoberly

Tim said:
Have you considered using a different approach such as automating an instance of IE using VB or VBA (eg. from excel?)

That typically does not suffer from the same restrictions as using javascript in another web page.
What type of process are you trying to automate in the "target" page ?

I'd like to read information from the iframe (which for all intents
*is* the browser window, as it occupies all but the top 5% of available
space), roll it into an email message (Lotus Notes), and send it to a
defined individual. (Think of it like the "Send to a Friend" feature
you find on most news sites.) So "automating an instance of IE" won't
work, as it's got to be the IE window that's currently in use. I'm
open to straight VBA, though, if I can initiate it through a
navigation-style button or a free, user-configurable plugin bar at the
top of IE.

Hmm, is THAT even do-able?

Thanks for the quick reply, Tim!

Todd
 
K

Kevin Darling

A few months ago I posted a question about using a file on my hard
drive to perform cross-frame scripting and pull data from a server on
my company's intranet. I eventually got this working using an HTA file
and Internet Explorer.

Now I'm tackling a similar issue, but really need to keep the IE menus,
navigation buttons, etc. this time around.

How many of the stock menus do you really need? If it's mostly
navigation and say, print, then I'd write an HTA mini-browser wrapper.
Something like the example in Figure 8 at:

http://www.microsoft.com/mind/0799/htmlapps/htmlapps.asp

Best, Kev
 
T

taoberly

Kevin said:
(e-mail address removed) wrote:

How many of the stock menus do you really need? If it's mostly
navigation and say, print, then I'd write an HTA mini-browser wrapper.
Something like the example in Figure 8 at:

http://www.microsoft.com/mind/0799/htmlapps/htmlapps.asp

I had considered that, but given how many people still wrinkle their
noses at trying a different browser, I don't think a homemade approach
will go over well. The look/layout has to be highly familiar.

I've never found docs for it, but there is apparently a way for
third-party applications to make custom buttons in IE through the
registry, so short of any better ideas, I will start researching in
that direction. Hopefully it will support starting a VBA script.

Thanks,

Todd
 
T

TC

Assuming a solution exists, I'm guessing it involves using
the IE6 SP2 "Mark of the Web" feature.

You guess wrong. MOTW does not, in and of itself, enable cross-site
scripting. It just causes your page to be executed wth the security
settings of the Internet zone, instread of the (higher) settings of the
Local zone. If your Internet zone settings do not allow cross-frame
scripting - and they normally wouldn't & shouldn't - your MOTW page
will not be able to do that either.

There's a "document.domain" thing that might help. I'm not sure,
because I'm no expert on that, and I haven't read your whole post in
detail. Check it out, perhaps it would help.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com
(Atspace is currently unreliable. Please be patient and/or try again
later.)
 
W

Walter Zackery

The only way that I see to avoid using an HTA is not to use frames. Since
one frame seems to merely consist of controls to control the other frame,
why not dynamically inject that code onto the other page at runtime, thereby
avoiding the frame problem altogether?

: Kevin Darling wrote:
: > (e-mail address removed) wrote:
:
: > > Now I'm tackling a similar issue, but really need to keep the IE
menus,
: > > navigation buttons, etc. this time around.
: >
: > How many of the stock menus do you really need? If it's mostly
: > navigation and say, print, then I'd write an HTA mini-browser wrapper.
: > Something like the example in Figure 8 at:
: >
: > http://www.microsoft.com/mind/0799/htmlapps/htmlapps.asp
:
: I had considered that, but given how many people still wrinkle their
: noses at trying a different browser, I don't think a homemade approach
: will go over well. The look/layout has to be highly familiar.
:
: I've never found docs for it, but there is apparently a way for
: third-party applications to make custom buttons in IE through the
: registry, so short of any better ideas, I will start researching in
: that direction. Hopefully it will support starting a VBA script.
:
: Thanks,
:
: Todd
:
 
K

Kevin Darling

I'd like to read information from the iframe (which for all intents
*is* the browser window, as it occupies all but the top 5% of available
space), roll it into an email message (Lotus Notes), and send it to a
defined individual. (Think of it like the "Send to a Friend" feature
you find on most news sites.) So "automating an instance of IE" won't
work, as it's got to be the IE window that's currently in use. I'm
open to straight VBA, though, if I can initiate it through a
navigation-style button or a free, user-configurable plugin bar at the
top of IE.

Okay, I'm going back to concentrate on your original request.

It sounds like you want this tool to be built-in to everyone's browser.
That means either a Link or a right-click menu (for IE, anyway).
Both are easy to do.

Do you have a tiny example of what you're trying to pick up from a
page, to put in that email? In other words, are you reading just the
text or a selected HTML section or ? If it's not complicated, then
a Link might work. Otherwise you'll need the right-click context
menu.

Kev
 
A

asdf

You need to be cookied or at least jscript enabled, or their
write to customer disk before displaying anything otherwise
takes ground.
 
T

taoberly

Kevin said:
It sounds like you want this tool to be built-in to everyone's browser.
That means either a Link or a right-click menu (for IE, anyway).
Both are easy to do.

Do you have a tiny example of what you're trying to pick up from a
page, to put in that email? In other words, are you reading just the
text or a selected HTML section or ? If it's not complicated, then
a Link might work. Otherwise you'll need the right-click context
menu.

Actually, I ran some more usenet searches and found the docs for custom
buttons and explorer bars, and a link to MS's GUIDGen program. A
horizontal explorer bar actually seems like the best solution, as I'm
not stuck making a bunch of .ico files. I want something that stares
the user in the face, else they forget to use it. My only concern now
is that I don't have docs on how to access the DHTML tree of the main
web page, or a reasurrance this is possible. (I assume it is.) I wish
explorer bars were movable so I could put it near the top of the window
instead, but overall that's a small thing. I will be reading roughly 6
text strings from a terse-looking web page, so it may take a little
creativity, but hopefully I'm now over the hump.

Thanks for all the suggestions,

Todd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top