Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Password protect page error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Password protect page error

 Post Reply Post Reply
Author
mouse View Drop Down
Newbie
Newbie


Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote mouse Quote  Post ReplyReply Direct Link To This Post Topic: Password protect page error
    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"%>

 

 



Edited by mouse
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2003 at 9:59am

Try putting it under the <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

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

 

Back to Top
mouse View Drop Down
Newbie
Newbie


Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote mouse Quote  Post ReplyReply Direct Link To This Post 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

<%@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;
%>

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2003 at 10:28am
Do all your other pages it works on use Javascript or Vbscript?
Back to Top
mouse View Drop Down
Newbie
Newbie


Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote mouse Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2003 at 10:29am
The others are just HTML.
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.