puppi
11-01-2003, 04:32 PM
This script for simple security, from CGI Creating a Webpage, is resulting in an error: opener.location,href+ loc not an object.
Here is the script:
<script language="JavaScript" TYPE="text/javascript">
<!--
function SubmitPassword(frm)
{
//
// Get the value entered into the text box
//
var password = frm.pw.value
//
//Convert it to lower case
//
password = password.toLowerCase()
//
//Add the .htm extension
//
var loc=password + ".htm"
//
// make sure the user entered something
//
if (password != "")
{
//
// If so, send the browser there
//
opener.location.href=loc
}
//
//Close this window
//
window.close()
}
// -->
</script>
Anybody see how to fix this? Thanks.
Here is the script:
<script language="JavaScript" TYPE="text/javascript">
<!--
function SubmitPassword(frm)
{
//
// Get the value entered into the text box
//
var password = frm.pw.value
//
//Convert it to lower case
//
password = password.toLowerCase()
//
//Add the .htm extension
//
var loc=password + ".htm"
//
// make sure the user entered something
//
if (password != "")
{
//
// If so, send the browser there
//
opener.location.href=loc
}
//
//Close this window
//
window.close()
}
// -->
</script>
Anybody see how to fix this? Thanks.