...

View Full Version : Changing window attributes



redundant
08-09-2004, 11:40 AM
hey guys

javascript isn't my strong point, but it looks like i'm going to need it this time. i'm making a flash movie for a project at school, and basically, i need to change the size of an internet browser (ie) and get rid of the toolbar, status bar, etc.

i know you can do all that stuff through the window.open command, but i need to do all this to the current window.

this won't actually be going on the internet or anything, so i don't need to worry about any inconsistencies between browsers etc.

if anyone could help it would be MUCH appreciated.

neofibril
08-09-2004, 12:33 PM
Configure the InternetExplorer Object (http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp), in a script file, and run that.

redundant
08-09-2004, 01:06 PM
sorry, the internet explorer object?

how do i do that?

neofibril
08-09-2004, 01:27 PM
Well, its a long story...

What all are you looking to do with the project, window-wise?

Take a look at the HTA (http://msdn.microsoft.com/workshop/author/hta/hta_node_entry.asp) documentation, for a simpler, but less flexible set up.

redundant
08-09-2004, 01:35 PM
all i need is for the first window that i launch from flash (which has a local address) to be of a specific size, and without the toolbars/statusbar/any of that junk

neofibril
08-09-2004, 01:41 PM
Ok, post your current code, so that someone might provide pointers, based on that.

Be sure to read the manual, too, while you're at it. ;)

jamescover
08-09-2004, 01:49 PM
http://www.ekigroup.com/javascript/winGen.html

redundant
08-09-2004, 03:19 PM
ok, so i think maybe i was a bit misleading when i started ranting about my project being based around flash.

just say for instance i have an html page that is just



<html>

</html>


is there something i can add to that code that would make the page a certain size, and get rid of toolbars etc.

i am not opening a new window

neofibril
08-09-2004, 03:37 PM
No, there are three ways to go about it, and each has already been pointed out.

jamescover
08-09-2004, 03:40 PM
i am not opening a new window

You can't change the attributes of the original window.


-james

redundant
08-10-2004, 12:15 AM
ok then, thanks for your help guys

jamescover
08-10-2004, 12:23 AM
ok then, thanks for your help guys

Best you can do with Javascript, is to open a child window and immediately close the parent. I do this on my own site.

A little js JuJitsu to bypass the window close prompt:

<body onLoad="javascript:window.parent='';window.close();">



-james



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum