SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Emegrency.. writing to a window
-
Sep 29, 2003, 15:26 #1
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Emegrency.. writing to a window
I have 2 popup windows... a main one and a child of the main...
I need to write from the main window to the child.. this is part of a desktop application, so here we go:
Main File: director.html
Code:<html> <head> <SCRIPT TYPE="text/javascript"> <!--// function installWindow1() { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); window.menubar.visible = false; window.directories.visible = false; window.statusbar.visible = false; window.toolbar.visible = false; window.locationbar.visible = false; window.personalbar.visible = false; window.scrollbars.visible = true; //window.fullscreen = true; window.outerWidth = 840; window.outerHeight = 630; window.screenY = 0; window.screenX = 0; //window.innerHeight = 610; //window.innerWidth = 810; netscape.security.PrivilegeManager.disablePrivilege("UniversalBrowserWrite"); location.href = 'http://localhost/cvideo/director/home.php'; } function installWindow2() { day = new Date(); id = day.getTime(); w4 = window.open( 'till.html', id, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=10,height=10'); } function install_window() { installWindow1(); installWindow2(); } //--> </script> </head> <body onload="install_window();"> </body> </html>
Code:<html> <head> <SCRIPT TYPE="text/javascript"> <!--// function install_window() { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); window.menubar.visible = false; window.directories.visible = false; window.statusbar.visible = false; window.toolbar.visible = false; window.locationbar.visible = false; window.personalbar.visible = false; window.scrollbars.visible = true; // window.fullscreen = true; window.outerWidth = 840; window.outerHeight = 460; window.screenY = 300; window.screenX = 185; //window.innerHeight = 610; //window.innerWidth = 810; netscape.security.PrivilegeManager.disablePrivilege("UniversalBrowserWrite"); location.href = 'http://localhost/cvideo/director/till.php'; } //--> </script> </head> <body onload="install_window();"> </body> </html>
-EricEric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Sep 29, 2003, 19:56 #2
- Join Date
- Dec 2002
- Location
- Alabama, USA
- Posts
- 2,560
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The 'javascript context' for the variable w4 is the page 'director.html'. But after installWindow1() loads the page 'home.php' the variable w4 no longer exists.
The page 'home.php' must have its own javascript which gets a reference to the child window. But that is not possible because the 'name' of the window is the time. If the child window's name was known to 'home.php' then it could doc.write to it.
It looks like there are several different ways to do this.Cross-Browser.com, Home of the X Library
Bookmarks