Solved

Dynamic changing the security of a frame in HTA

Posted on 2008-10-28
4
326 Views
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:  http://cwashington.netreach.net/depo/view.asp?Index=625
but I can't simplify this code to make it work.

Any help please? Thanks!
0
Comment
Question by:Wirwar
  • 2
  • 2
4 Comments
 
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
0
 

Author Comment

by:Wirwar
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.)
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 125 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
0
 

Author Closing Comment

by:Wirwar
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.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now