Solved

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

Posted on 2010-08-19
6
1,139 Views
Last Modified: 2012-05-10
Experts:

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.
0
Comment
Question by:piattnd
  • 4
  • 2
6 Comments
 
LVL 9

Expert Comment

by:Snarfles
ID: 33482349
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...
0
 
LVL 12

Author Comment

by:piattnd
ID: 33486513
Could you expand on that a little bit?  I know what innerHTML is, but I'm confused how that applies here :).
0
 
LVL 12

Author Comment

by:piattnd
ID: 33487955
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?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Accepted Solution

by:
Snarfles earned 500 total points
ID: 33487989
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.
0
 
LVL 12

Author Comment

by:piattnd
ID: 33489680
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)?
0
 
LVL 12

Author Closing Comment

by:piattnd
ID: 33796364
Thank you for your assistance, but I decided to develop the solution into C# which gives me greater control over the web browser control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Javascript Hashmap output 8 46
Tags from access to excel 3 30
Full Screen problem when auto scale IFRAME 2 65
Wrapper for APPs 9 37
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now