Javascript/windows - Open and close window with one click

They have: 5 posts

Joined: May 1999

I'm trying to both open a new window and close a window with one click. I've got it working in I.E., but it doesn't work in NN. The script I'm using is as follows:

function closopen()
{
window.open("contact.htm","","toolbar=0,menubar=0,status=0,width=600,height=500,top=50,left=100");
self.close();
}

Any ideas on what I can do to make this work in NN?

Thanks.

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

I think closing the main window is a security issue and some browsers just won't let you do it. Then again, if someone else knows how please post it for us. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.