views:

25

answers:

2

(Note: This question is for an internal-use-only project, so some of the usual security concerns don't apply.)

I'm trying to find some way to insert HTML/Javascript into a pre-existing IE7 browser window. Basically, we are using a web-based support ticket system, and I am inserting code into the page to add links and lists and such, to improve an otherwise clunky interface.

So far I have been able to open some browser windows myself, and then through ownership go in and edit them, but I haven't found a way yet to do the same for ticket windows opened directly by the user.

I've considered using ActiveX, or maybe wrapping the whole support site in a custom browser application, but without going through the time to try out each method I'd like to get some opinions on what might actually work, especially given the new security measures that IE7 and above have in place.

A: 

If bookmarklets won't work, maybe try something like Trixie (GreaseMonkey for IE)

Annie
SpriteMe looks interesting, but as a bookmarklet it looks like it has to be activated by the user. I need a solution that can be applied automatically, especially since many of the ticket windows that get opened are without toolbar/addressbar/menus.
Nairou
I think the second-simplest thing after bookmarklets are user scripts. Answer updated.
Annie
A: 

If you can get the IHTMLWindow2 pointer, you can call execScript(). The easiest way to do that for browsers you don't own is to use the Accessibility hack described here to get the IHTMLDocument2, and then you should be able to just call get_parentWindow().

I haven't tried it, but that should work.

jeffamaphone