PDA

View Full Version : Configuring window onLoad


BoilerRKD
04-22-2003, 02:55 PM
Hi,

I'm in the process of developing an internal website that will be burnt onto a CD. When users start up the CD, I want to launch a menu file that will open in a window with specific characteristics such as 500 X 400 width/height, centered position on a user's screen, no toolbars, no menu, and resizable.

The first method I used in attempt to accomplish this was to make a startup.html file (parent window) that would automatically launch the menu (child) window with appropriate characteristics using <body onLoad.........> Once the menu window was launched, the parent window would be closed. However, because of the specific Internet security settings that can be configured by users in IE, there is a strong probability that most IE users would be confronted with the annoying confirmation message regarding whether to close the parent window. I really don't want this.

Is there any way that I can open the menu file in a window that can be dynamically configured when the page is loaded, thus eliminating the need to launch a child window with the appropriate deminsions? I've tried to find a viable work-around for the first method, but I haven't come across anything that will totally avoid the IE confirmation close window message.

Thanks in advance.

Roy Sinclair
04-22-2003, 03:43 PM
You need to read up on HTML Applications, they'll allow you to do what you want and a whole lot more. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie50/html/Ie5hta.asp

sage45
04-22-2003, 03:57 PM
If you are referring to the CD itself automatically starting up when you place it into the cd-rom drive... Then you will need to create an autorun.inf file on the root directory of the cd...

To find information on creating, formatting and/or using the autorun feature on pc's, check here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_intro.asp

HTH,

-sage-

shlagish
04-23-2003, 01:28 AM
<html>
<head>
<script type="text/javascript">
<!--
function set_window()
{
window.resizeTo(500,400);
}
-->
</script>
</head>
<body onLoad="set_window()">
</body>
</html>

When this window loads, it's width will become 500 and it's height will become 400....
if that is what you want

BoilerRKD
04-23-2003, 03:28 AM
shlagish,

Thanks for the code. I actually used the resizeTo method before I started the thread and it works to some degree. I would like to get all the content within a 500 x 400 dimension, but this not possible because of the menu bars, status bar, and address bar taking up some of the space.

Is there any way that I can eliminate those features when a current window is loaded without having to mess with browser privilege settings? If this can be done, I could get the dimensions to work as I want them to.

Thanks,
Ryan

BoilerRKD
04-23-2003, 03:54 AM
Roy Sinclair,

Thanks for the link. The article was very insightful. Since HTA's are Windows based, or more specifically DHTML based, is there any possible way that they can be installed on a Mac box? 95% of the users that will use the CD I'm creating will be using Windows, but there will be some rare Mac users.

Thanks,

Ryan

Roy Sinclair
04-23-2003, 04:13 PM
The HTML applications are a MS only function, I'm fairly certain that MS didn't port any of that to the Mac but you could check easily enough by seeing if IE on the Mac handles .hta files and lets them operate. Since you need to go cross-OS here (which is a good reason for using HTML code in the first place) the HTML applications approach may not be your solution after all. Unfortunately it's the only good solution I know of, there are some ways to get some browsers to shut down without the message but it's not something you can count on being available and I still don't know that it works on any of the browsers available on the Mac.

lmroces
08-18-2008, 09:28 PM
How do you hide the toolbars?