I am currently working to write a few custom scripts that I can use to manage my systems. I would like to seperate out specific functionality into seperate ..hta documents and have a main document that uses frames to load and manage these various files. Here is a snippet of my main file that loads and manages the frames: <html> <head> <title>Windows Server Management Console</title> <HTA:APPLICATION APPLICATIONNAME="WSMC" VERSION="1.0a" NAVIGABLE="yes"/> <link rel="stylesheet" href="test.css" type="text/css"/> <script language="vbscript" src="scripts/mainpage.vbs"></script> </head> <frameset cols="150,*" onload="ResizeWindow"> <frame APPLICATION="yes" id="SystemMenu" name="SystemMenu" noresize frameborder="0" src="menu.hta"> <frame APPLICATION="yes" id="ApplicationWindow" name="ApplicationWindow" noresize frameborder="0" src="welcome.html"> </frameset> </html> I have a few problems while running this script: 1) The menu.hta file causes a security prompt to be shown even though I have set the frame to be an HTA application container by using APPLICATION="yes". According to the HTML and HTA SDK's, I should just put in a APPLICATION="yes" to propogate the open-security features of HTA to a containing frame. 2) It appears that the <LINK> tag is not loading the stylesheet. If I embed the styles directly into the document, it works great, just the linked resources will not load. Is this due to a security issue as well? Thanks for any pointers!
> I have a few problems while running this script: > 1) The menu.hta file causes a security prompt to be shown even though > I have set the frame to be an HTA application container by using > APPLICATION="yes". According to the HTML and HTA SDK's, I should just > put in a APPLICATION="yes" to propogate the open-security features of > HTA to a containing frame. Pages displayed in trusted frames (application="yes") should not have the ..hta extension. They inherit the security model of the container HTA by virtue of being in a trusted frame. > > 2) It appears that the <LINK> tag is not loading the stylesheet. If I > embed the styles directly into the document, it works great, just the > linked resources will not load. Is this due to a security issue as > well? I don't link stylesheets to the parent HTA if it is simply a container for a frameset having no content of its own. I put those sylesheet links in the individual pages displayed in the frames. It's not clear what you mean by 'embed the styles directly in the document' - the framed document or the hta container document? AFAIK, sytles don't cascade from parent to child (frame/iframe) documents. -- Michael Harris Microsoft MVP Scripting
Thank you for the quick response. A few minutes after submitting this question, I figured out what I had done wrong. Things are working great now! "Michael Harris (MVP)" wrote: > > I have a few problems while running this script: > > 1) The menu.hta file causes a security prompt to be shown even though > > I have set the frame to be an HTA application container by using > > APPLICATION="yes". According to the HTML and HTA SDK's, I should just > > put in a APPLICATION="yes" to propogate the open-security features of > > HTA to a containing frame. > > Pages displayed in trusted frames (application="yes") should not have the > ..hta extension. They inherit the security model of the container HTA by > virtue of being in a trusted frame. > > > > > 2) It appears that the <LINK> tag is not loading the stylesheet. If I > > embed the styles directly into the document, it works great, just the > > linked resources will not load. Is this due to a security issue as > > well? > > I don't link stylesheets to the parent HTA if it is simply a container for a > frameset having no content of its own. I put those sylesheet links in the > individual pages displayed in the frames. It's not clear what you mean by > 'embed the styles directly in the document' - the framed document or the hta > container document? > > AFAIK, sytles don't cascade from parent to child (frame/iframe) documents. > > -- > Michael Harris > Microsoft MVP Scripting > > > > >