View Full Version : Pop Up Window link

02-27-2003, 03:31 AM
I understand how to create a pop up window using PopUp(PopUpUrl) but how can I activate the script via a link?

I need to know how to reference the popup window with a URL ...


Here is the pop up script I am using

function PopUp(PopUpUrl){
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
var movefromedge=0;
WinPop=window.open(PopUpUrl,"","width=500,height=400,toolbar=0,location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=1, left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+",");
<input type="button" name="popbutton" value="Open PopUp" onclick="PopUp('http://********/trainingmodules/basicelectricity/ElectricalTerms.htm')">

02-27-2003, 04:53 AM
You mean this?

<a href="#" onclick="PopUp('http://********/trainingmodules/basicelectricity/ElectricalTerms.htm');">


<a href="javascript: PopUp('http://********/trainingmodules/basicelectricity/ElectricalTerms.htm');">

Note: There should be no space in the word javascript, the board automatically puts it in.

02-27-2003, 05:12 AM
I am using an online training application, which I create modules using Macromedia Director. I am trying to get the shockwave file (.dcr) to open in a window... I embedded it in its own page... the dcr file is but 500x400... and I want the page to open to the same size ... The URL will be called through an app online... the app asks for a URL to link to the page... when I do this, a new page opens up in the wrong size... I figured out how to get the page to open correctly via a button, but I need the page to open correctly on its own, with out the script being in the button. It can only be referenced by a URL...

How do you use the script you posted Goose??? How do I embed this script in a URL reference. http://??????