|
function Showpopup(PagePath,target, height, width, menubar, locationbar, resizable, scrollbars, status, titlebar, toolbar, fullscreen) {
var currentIndex = 0;
var ProbsArray = new Array();
if (height != "") { ProbsArray[currentIndex] = "height=" + height; currentIndex++; }
if (width != "") { ProbsArray[currentIndex] = "width=" + width; currentIndex++; }
if (menubar != "") { ProbsArray[currentIndex] = "menubar=" + menubar; currentIndex++; }
if (locationbar != "") { ProbsArray[currentIndex] = "location=" + locationbar; currentIndex++; }
if (resizable != "") { ProbsArray[currentIndex] = "resizable=" + resizable; currentIndex++; }
if (scrollbars != "") { ProbsArray[currentIndex] = "scrollbars=" + scrollbars; currentIndex++; }
if (status != "") { ProbsArray[currentIndex] = "status=" + status; currentIndex++; }
if (titlebar != "") { ProbsArray[currentIndex] = "titlebar=" + titlebar; currentIndex++; }
if (toolbar != "") { ProbsArray[currentIndex] = "toolbar=" + toolbar; currentIndex++; }
if (fullscreen != "") { ProbsArray[currentIndex] = "fullscreen=" + fullscreen; currentIndex++; }
var top = parseInt((screen.availHeight / 2) - (height / 2));
if (width != "")
{
var left = parseInt((screen.availWidth / 2) - (width / 2));
ProbsArray[currentIndex] = "left=" + left;
currentIndex++;
ProbsArray[currentIndex] = "screenX=" + left;
currentIndex++;
}
if (height != "")
{
ProbsArray[currentIndex] = "top=" + top; currentIndex++;
ProbsArray[currentIndex] = "screenY=" + top; currentIndex++;
}
window.open(PagePath, target, ProbsArray.join(","));
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.