Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Dynamic changing the security of a frame in HTA

Posted on 2008-10-28
Medium Priority
Last Modified: 2012-05-05
I've made a html application with a number of functions. It will run on a local pc in a corporate network.
One function is to expand the hta window to get information from not-local locations in an Iframe.

I've got two external sources. In the parent hta window one button opens the page from location#1, another buttons opens from location #2
The problem now is that for location#1 the iframe should have:  application="yes", but then the page from the other location doesn't work  as expected.

So what i'm looking for is some code to set or reset the security setting of this iframe when a button is clicked.

The only reference I found on this subject is:
but I can't simplify this code to make it work.

Any help please? Thanks!
Question by:Wirwar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 75

Expert Comment

by:Michel Plungjan
ID: 22829588
Erm. Imagine if you could.
Bad security. Virus behaviour

Anyway, WHY does the other location not work as expected. I have never had any such issues

Author Comment

ID: 22829882
Hi mplungian.. that's what I thought in the first place, until the above posted link to the security manager came up..

I'll explain a bit more about the situation:

The hta toolbar I developed supports development and testing activities for a webshop.

One function is to create different sql scripts from a product number. To execute the script we  can use a webpage in the sitemanager. This sitemanager is a framed 'website' of its own.

I can open this particular sql form 'stand alone' in the Iframe of the (expanded) toolbar. So we don't have to browse through the sitemanager site. For quick look-ups this is a plus.

However, there is a sitemanager login-screen before this sql-page, with a frame-checker.
The problem is: after this check page refreshes to the top of my toolbar.

When I have the iframe in my toolbar *without* application=yes, this iframe-check does not refresh to the top and after login, the sql page appears in the frame and can be used.
Why this works as described.. I don't know :)

Another function is a documentation tool.
I've got a number of htm files in folders on another server. With a script I read the folders filenames and it generates an index. In the Iframe of the expanded toolbar a menu appears where these filenames of the selected folder are listed and onClick the document can be read.
This is pretty cool, but it works only if the I frame has application = "yes"

And this I why I like to have some kind of frame management.

Security is not an issue in this situation, but I understand that generally spoken this is not really a wanted solution
So it's a no-go? But what about the 'solution' mentioned in the link?

(In my case I can make a 'work-around': I'll add another iframe and show/hide the not-used frame.)
LVL 75

Accepted Solution

Michel Plungjan earned 375 total points
ID: 22834102
I cannot tell you. I do not see the security manage do what you need it to do.
Showing and hiding the appropriate iframe is not even a workaround in my opinion, but a simple way to achieve what you want.

Without seeing the frame-checker I cannot tell you why. Sounds like a location.replace thing

Author Closing Comment

ID: 31510666
Thank you for your time (and the great good work you and the other members in the hall of fame are doing!)  I hoped that manager thing could help, but on your advise i'm going to work out the second frame option.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

721 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