View Full Version : Opening & Closing Views ("IF" solution)

06-25-2004, 10:52 AM
I can open a site into a main window using:


<script language="javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
win = window.open(mypage,myname,settings)

<!-- Begin
if (this.name!='fullscreen'){
// End -->


a href="javascript:opener.location='main.htm';window.close()"><img border="0" src="images/index/l_subheader.gif" width="194" align="right" alt=""></a>

& close it into a browser by using:


a href="main_full.htm"><img src="images/index/l_subheader.gif" alt="" width="194" height="36" border="0" align="right"></a>

I need an "IF" solution becuase this method requires to pages - eg. main.htm & main_full.htm - that have the same display and information for the public. (And it also means that I have to update 2 pages every time i need to change something)

What I need is a method to use one web page - eg. main.htm - but have the ability to open to full screen and close to browser without redirecting it to a second page - eg main_full.

Is it posible? Can someone help please?