Need ideas for an HTA to display a website without using an iFrame


I made a tool that utilizes an iFrame to load and refresh a certain website.  Since then, the developers for that website appear to have added code to determine whether it's being run within an iframe, and if it is it kicks open a new window or takes over an existing IE window.

I need some ideas on how else I can load the webpage into my HTA OR I can sense that the HTA is trying to open an external window and deny it.

FYI, I tested the theory in just an HTML file with an iFrame for this website.  When the website came up, the IE window went from my HTML file to their website.
LVL 12
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

SnarflesConnect With a Mentor Commented:
Well the theory is that you could open the page into a new window. Referencing this window you could then grab the whole contents of the window into javascript. In your javascript you would then search through for the breakout script in your variable string and remove it. You could then output that to any element on your site like a div. After grabbing the contents of the page you would close the popup window.

Of course the immediate flaw with this is that you need to ensure popups wern't blocked by the user which of course you can't do in the real world, but it might work on an intranet if you control peoples settings...

Also it would depend on the contents of the window and how much interaction the user needs to do with it.

Of course just a theory... it might work... it might not.
Well you're not meant to be able to do this... thats why its a breakout script :)

However I found this comment...

"This can be accomplished by grabbing the HTML of the page using
innerHTML and removing the part that you don't like and then setting
innerHTML to that. (you might have to open another window and use that) "

This idea could work in theory...
piattndAuthor Commented:
Could you expand on that a little bit?  I know what innerHTML is, but I'm confused how that applies here :).
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

piattndAuthor Commented:
I think I know what you're saying now, but I can't right click/view source, so how can I (programatically) grab the source of the site?
piattndAuthor Commented:
I'm not familiar with Javascript and I don't know how to grab the source code via VBscript.  Can you give me an example using javascript (or a link with the description)?
piattndAuthor Commented:
Thank you for your assistance, but I decided to develop the solution into C# which gives me greater control over the web browser control.
All Courses

From novice to tech pro — start learning today.