Thanks in advance for your time.
I use this code to open pop-up windows and want to learn how to use it in other .js files.
POP-UP:
function PopUp(PopUpUrl,xW,xH){
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
var movefromedge=0;
placementx=(ScreenWidth/2)-((xW)/2);
placementy=(ScreenHeight/2)-((xH+50)/2);
WinPop=window.open(PopUpUrl,"","width="+xW+",height="+xH+",toolbar=0,location=0,directories=0,status =1,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX=" +placementx+",screenY="+placementy+",");
}
I utilize it externally; popup.js. Using as such:
<a href="javascript:PopUp('somefile.htm','300','280')">
Then I have other .js files where I would like to use it, like for the footers on most of my pages; footer.js:
document.write('<P><a href="email.htm" target="_blank">click for PC help</a>');
What I would like to have is the email.htm file in footer.js to open utilizing the pop-up code.
I imagine using php is best. I would like to continue they way I'm currently running it but am willing to learn a different way.
Thanks again!
I use this code to open pop-up windows and want to learn how to use it in other .js files.
POP-UP:
function PopUp(PopUpUrl,xW,xH){
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
var movefromedge=0;
placementx=(ScreenWidth/2)-((xW)/2);
placementy=(ScreenHeight/2)-((xH+50)/2);
WinPop=window.open(PopUpUrl,"","width="+xW+",height="+xH+",toolbar=0,location=0,directories=0,status =1,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX=" +placementx+",screenY="+placementy+",");
}
I utilize it externally; popup.js. Using as such:
<a href="javascript:PopUp('somefile.htm','300','280')">
Then I have other .js files where I would like to use it, like for the footers on most of my pages; footer.js:
document.write('<P><a href="email.htm" target="_blank">click for PC help</a>');
What I would like to have is the email.htm file in footer.js to open utilizing the pop-up code.
I imagine using php is best. I would like to continue they way I'm currently running it but am willing to learn a different way.
Thanks again!
Comment