Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gate Keeper

Status
Not open for further replies.

tjc240e

Technical User
Nov 12, 2004
133
US
I dont know if any uses this little program but i like it for simple password protection of a file. It seemed to work for a while and now all of a sudden it keeps giving me opener.closed is null error message. this line is in the second code block. Also i've worked around it and removed that opener.closed line and now it when the correct password is put in it pops up a window telling me that the page im going to is trying to close the current window do i want to do this yes or no. All I want is after i put in the password is for the page to be brought up into the existing window like it used to. Suggestions?

Code:
<SCRIPT LANGUAGE="javascript">
                <!--- Hide from tired old browsers
                var nifty_little_window = null;
                function gateKeeper() {
                nifty_little_window = window.open('gatekeep.html', 'theKeeper',
                'width=350,height=200,resizable=1');
                }
                // End hiding --->
                </SCRIPT>
<form>
<input type="button" value="Enter Here" onClick="gateKeeper()"
</form>

Code:
<HTML>
<HEAD>
<TITLE>Gate Keeper</TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from tired old browsers that should be put to pasture.

////////////////////////////////////////////////////////////////////
///  Get your very own Gate Keeper from Professional Web Design  ///
///  [URL unfurl="true"]http://junior.apk.net/~jbarta/weblinks/gate_keeper/[/URL]         ///
////////////////////////////////////////////////////////////////////

function goForit() {
  var location;
  var password;
  password=this.document.testform.inputbox.value
  location=password + ".html"
  fetch(location)
  theKeeper=window.close()
}

function fetch(location) {
  var root;
  if (opener.closed) {
    root=window.open('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');
    root.location.href = location;
  } else {
    opener.location.href = location;
  }
}

// End hiding --->
</SCRIPT>

</HEAD>
 
These things don't break for no reason. Have you installed new software? Revved the script? Updated your browser version? Installed any 3rd-party toolbars / addons? Installed any internet / other security suites (firewalls, etc)?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I did rebuild my laptop, and then reinstall dreamweaver, but it's not just on the laptop that i'm getting the problem. could it be with the site that is holding my pages? Do i need to put something on the site that i might be missing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top