View Full Version : Browser Window from CD-ROM
wyclef
04-01-2004, 12:03 PM
Is it possible to open up a browser window that is stripped down from a flash projector file off a cd-rom?
Ruben
04-01-2004, 12:49 PM
And what would "stripped down" mean?? Chromeless or something??
- Ruben
wyclef
04-01-2004, 12:54 PM
just your typical javascript pop up window, with toolbar, location, status all false, etc....
Ruben
04-01-2004, 02:19 PM
Hm, dunno actually...
I was thinking of opening a html-page in normal browser using getURL, and that the html-page would open the popup and then close itself [window.close()].
But of course the browser would ask the viewer for permission to close the browser since it's normal browser and not a popup....
So I don't know...
Sorry ;) - Ruben
wyclef
04-01-2004, 06:29 PM
Is it possible to open up a JS Pop-Up browser window from a Flash Projector file off a CD-ROM?
If not, is there a way to just open a browser window, that launches a pop-up and then close the parent window once the pop up is loaded? I tried the following for that but it doesn't work.
Parent Window Code:
<html>
<head>
<title></title>
<script LANGUAGE="JavaScript">
<!--
var newWin;
function openNewWin() {
newWin = window.open('newWin.html','newWin','width=210,heig ht=240');
}
function closeNewWin() {
if (newWin.location) { newWin.close(); }
}
// -->
</SCRIPT>
</head>
<body onLoad="openNewWin();">
<table BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=400 ALIGN="center">
<tr>
<td><font SIZE="+1"><b>Opening a Pop-Up Window that Closes When Its Parent Document is Unloaded</b></font></td>
</tr>
</table>
</body>
</html>
POP UP WINDOW CODE:
<html>
<head>
<title></title>
</head>
<body onload="closeNewWin();">
<table BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=400 ALIGN="center">
<tr>
<td><font SIZE="+1"><b>Opening a Pop-Up Window that Closes When Its Parent Document is Unloaded</b></font></td>
</tr>
</table>
</body>
</html>
wyclef
04-02-2004, 11:27 AM
???
Ruben
04-02-2004, 11:30 AM
I think that pretty much comes down to my first thought [which wouldn't work]: open a normal browser which would open the popup and then close the normal browser...
But the problem is, when you use "window.close()" on a normal browser the visitor will be asked wether or not they're OK with closing the normal browser...And I don't think that's what you want...
Not sure though...
So I guess you'll have to find another way...Maybe opening a JS-file that would open the popup, if that's possible...I'm not that kind of an expert when it comes down to javascript and stuff...
Anyways, good luck - Ruben
wyclef
04-02-2004, 11:33 AM
Anyone know if there would be a way to open a regular browser window, and then have it refresh to the appropriate sized window using meta refresh or something that would be quickest?
Ruben
04-02-2004, 11:54 AM
Hm, I could search on my HD for the meta-tag that makes a browser refresh, but I don't know if there's a way to have a browser resize itself...
And if there WOULD be a way, you'd still be stuck with the problem of not having a completely 'stripped down' [:p] browser [popup-style]...
But if you DO want the meta-tag just yell and I'll search my HD...
- Ruben
wyclef
04-02-2004, 12:09 PM
I'm making some progress and actually thinking it can be done however still need help. Here is my latest. I'm on a mac and i only seem to have control over the toolbar and menubar stuff in Netscape. Anyone have any suggestions how I can get this to work cross platform? I'm also interested in a function that will keep the window centered no matter what resolution monitor is set at.
<html>
<head>
<title>Pop Up Test</title>
<script type="text/javascript" language="JavaScript">
<!--
function doResize640()
{
window.resizeTo(640, 480);
}
self.menubar.visible=false;
self.toolbar.visible=false;
self.locationbar.visible=false;
self.personalbar.visible=false;
self.scrollbars.visible=true;
self.statusbar.visible=true;
// -->
</script>
</head>
<body onLoad="doResize640();">
</body>
</html>
Here is a function that might center window but I can't figure out how to implement it...
function reallyCenterWindow() {
leftPos = 0
topPos = 0
if (screen) {
leftPos = (screen.width / 2) - 251
topPos = (screen.height / 2) - 162
}
ElementWindow = window.open('Images/WindowElements.gif','ElementWin','width=502,height =325,left='+leftPos+',top='+topPos)
}
Ruben
04-02-2004, 12:16 PM
Hm, take a look at this thread (http://www.actionscript.org/forums/showthread.php3?t=29389&highlight=availheight)
There saying something like:
<script language="javascript">
window.moveTo(0,0);
</script>
Take a look at the thread anyways...Might give you some insight regarding what they used this piece of script for...
Tell me if it worked - Ruben
EDIT: You also might wanna check the results on my search (http://www.actionscript.org/forums/search.php3?searchid=12742)...
wyclef
04-02-2004, 12:48 PM
yeah, that didn't help out much.
Ruben
04-02-2004, 01:24 PM
Here is a function that might center window but I can't figure out how to implement it...
Why not, I thought you were wondering how you could center the window in one of your previous posts??
- Ruben
wyclef
04-02-2004, 03:16 PM
do you mind if i delete this trhread and start a new one. it's gotten too confused
Ruben
04-02-2004, 07:03 PM
No, I don't mind...You're right, things have gotten somewhat confusing indeed :rolleyes:
- Ruben
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.