Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-12-2001, 07:48 PM   #1
Jungl3M4n
uhhhh... I forgot.
 
Jungl3M4n's Avatar
 
Join Date: Nov 2001
Location: Caracas - Venezuela
Posts: 128
Send a message via ICQ to Jungl3M4n
Unhappy Problem opening a new window from a popup window

Hello fellas, I was reading the posts about popup windows and spawn windowns and no one fix my problem.

now what is the thing that has made this post to accur.

I have a flash movie opened in a popup window, now from the swf file I want to open a new browser window(Popup too) with some other stuff.

my code to popup the main movie:

Code:
<script language="javascript">
<!--
function PopupWin(page,IEWidth,IEHeight,NNWidth,NNHeight) {

  var MyBrowser = navigator.appName;

  if (MyBrowser == "Netscape") {
	var myWinWidth = (window.screen.width/2) - (NNWidth/2);
	var myWinHeight = (window.screen.height/2) - ((NNHeight/2) + 50);

	var myWin = window.open(page,"MainWin","width=" + NNWidth + ",height=" + NNHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  else {

	var myWinWidth = (window.screen.width/2) - (IEWidth/2);
	var myWinHeight = (window.screen.height/2) - ((IEHeight/2) + 50);

	var myWin = window.open(page,"MainWin","width=" + IEWidth + ",height=" + IEHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  myWin.focus();

}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>
and from the page that is open i will have to call another html pages and the code remains the same just change the function from PopupWin to PopupWin2

and nothing happens it still load in the same window and that DOESNT HAVE TO HAPPEN because you know

Please help.

maybe there is any way to set up that javasctipt to open in a
Code:
getURL("javascript:PopupWin2('........')","_blank");
or something.
Jungl3M4n is offline   Reply With Quote
Old 12-12-2001, 07:56 PM   #2
Jungl3M4n
uhhhh... I forgot.
 
Jungl3M4n's Avatar
 
Join Date: Nov 2001
Location: Caracas - Venezuela
Posts: 128
Send a message via ICQ to Jungl3M4n
Default by the way...

I have tested that about ","_blank"); and doesnt work.

This reply is to share with all of you that the code opens the popup window centered in the monitor no matter wich resolution the visitor have.

Ir is great.

Please help ASAP.

Greets,
Jungl3M4n is offline   Reply With Quote
Old 12-12-2001, 08:15 PM   #3
Jungl3M4n
uhhhh... I forgot.
 
Jungl3M4n's Avatar
 
Join Date: Nov 2001
Location: Caracas - Venezuela
Posts: 128
Send a message via ICQ to Jungl3M4n
Talking I fond it myself...

Thanks anyway.

The problem was here.

Remember the code???

Code:

<script language="javascript">
<!--
function PopupWin(page,IEWidth,IEHeight,NNWidth,NNHeight) {

  var MyBrowser = navigator.appName;

  if (MyBrowser == "Netscape") {
	var myWinWidth = (window.screen.width/2) - (NNWidth/2);
	var myWinHeight = (window.screen.height/2) - ((NNHeight/2) + 50);

	var myWin = window.open(page,"MainWin ","width=" + NNWidth + ",height=" + NNHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  else {

	var myWinWidth = (window.screen.width/2) - (IEWidth/2);
	var myWinHeight = (window.screen.height/2) - ((IEHeight/2) + 50);

	var myWin = window.open(page,"MainWin ","width=" + IEWidth + ",height=" + IEHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  myWin.focus();

}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>
take a look at the feature where the name of the window is set.

well it have to be changed, if no the browser will asume that you are oppening the new html file in the same window.







Enjoy the code and use it people its verry nice to open the popup windows centered.

Greets,
Jungl3M4n is offline   Reply With Quote
Old 12-12-2001, 08:16 PM   #4
Jungl3M4n
uhhhh... I forgot.
 
Jungl3M4n's Avatar
 
Join Date: Nov 2001
Location: Caracas - Venezuela
Posts: 128
Send a message via ICQ to Jungl3M4n
Talking I fond it myself...

Thanks anyway.

The problem was here.

Remember the code???

Code:

<script language="javascript">
<!--
function PopupWin(page,IEWidth,IEHeight,NNWidth,NNHeight) {

  var MyBrowser = navigator.appName;

  if (MyBrowser == "Netscape") {
	var myWinWidth = (window.screen.width/2) - (NNWidth/2);
	var myWinHeight = (window.screen.height/2) - ((NNHeight/2) + 50);

	var myWin = window.open(page,"MainWin ","width=" + NNWidth + ",height=" + NNHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  else {

	var myWinWidth = (window.screen.width/2) - (IEWidth/2);
	var myWinHeight = (window.screen.height/2) - ((IEHeight/2) + 50);

	var myWin = window.open(page,"MainWin ","width=" + IEWidth + ",height=" + IEHeight + ",screenX=" + myWinWidth + ",screenY=" + myWinHeight + ",left=" + myWinWidth + ",top=" + myWinHeight + ",scrollbars=yes,toolbar=0,status=1,menubar=0,resizable=0,titlebar=no");

}
  myWin.focus();

}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>
take a look at the feature where the name of the window is set.

well it have to be changed could be something likeMainWin2, if no the browser will asume that you are oppening the new html file in the same window.







Enjoy the code and use it people its verry nice to open the popup windows centered.

Greets,
Jungl3M4n is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup Window encrypt ActionScript 1.0 (and below) 1 05-29-2003 01:07 PM
targeting parent window from a popup Pixel ActionScript 1.0 (and below) 0 06-11-2002 07:06 PM
Popup problem (javascript) metamorphoze Server-Side Scripting 2 06-07-2001 02:25 AM
Drag Window Problem.....Need help..... CyberNated User 22 Other Flash General Questions 11 04-14-2001 10:13 AM
popup window problem rajarajan Other Flash General Questions 2 04-06-2001 03:32 AM


All times are GMT. The time now is 06:56 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.