Print Page | Close Window

Password protect page error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2503
Printed Date: 29 March 2026 at 4:18pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Password protect page error
Posted By: mouse
Subject: Password protect page error
Date Posted: 08 May 2003 at 8:16am

Hi, I'm using Bruce's password protect script to prevent unauthorised access to one of my asp pages using the correct previous page set-up.

I have got this working on other pages before but this is the first time with a Dream Weaver .asp file.

Keep getting an error message instead of the page loading which I assume is because I'm using a combination of Jscript and Java? I THINK??? Is there a simple answer?

Any help would be appreciated for this novice.

OPENING SCRIPT FOR MY ASP PAGE

%
'If the session variable is False or does not exsist then redirect the user to the unauthorised user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then
 'Redirect to unathorised user page
 Response.Redirect"unauthorised_user_page.htm"
End If
%>

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

 

 




Replies:
Posted By: Mart
Date Posted: 08 May 2003 at 9:59am

Try putting it under the <mailto:%@LANGUAGE="JAVAscript" CODEPAGE="1252"%'>%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

That bit normally has got to be the first line...

 



Posted By: mouse
Date Posted: 08 May 2003 at 10:15am

Tried that - didn't work!

I put the password script after the <!--~include... --> but that had no effect.

Any other clues?

This is the script without the password check

<mailto:%@LANGUAGE="JAVAscript'>%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/Customers.asp" -->

<%
var Full_Master_Details = Server.CreateObject("ADODB.Recordset");
Full_Master_Details.ActiveConnection = MM_Customers_STRING;
Full_Master_Details.Source = "SELECT * FROM Customers ORDER BY Date DESC";
Full_Master_Details.CursorType = 0;
Full_Master_Details.CursorLocation = 2;
Full_Master_Details.LockType = 1;
Full_Master_Details.Open();
var Full_Master_Details_numRows = 0;
%>



Posted By: Mart
Date Posted: 08 May 2003 at 10:28am
Do all your other pages it works on use Javascript or Vbscript?


Posted By: mouse
Date Posted: 08 May 2003 at 10:29am
The others are just HTML.


Posted By: MorningZ
Date Posted: 08 May 2003 at 10:38am

"Keep getting an error message instead of the page loading "

error message would be: ______________________ ?



-------------
Contribute to the working anarchy we fondly call the Internet



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net