Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Page Redirect


Message #1 by delcyan@w... on Thu, 25 Jul 2002 17:25:47
this is a wrong group to post this.. still.. are you sure it is coming
inside whatever loop it has to? Could you just test by giving a
response.write("whatever") just before and after that Response.Redirect

-----Original Message-----
From: delcyan@w... [mailto:delcyan@w...]
Sent: Thursday, July 25, 2002 10:56 PM
To: JavaScript HowTo
Subject: [javascript_howto] Page Redirect


Hello all,

I am having a little problem with my server side code which I am hoping it 
is a stupid miss take on my part.

In my asp page, I would like to redirect to another asp page if a 
condition is met. 

I had used the redirect to a html page but when I change it to redirect to 
another asp page it just does listen.

Please help.

Find my code below.

if blnLogIn = "T" then
		''Open Database connection
		SetConnection cnn	
			
		''Build the select SQL Statement
		strSQL = ""
		strSQL = strSQL & "SELECT * FROM PPR_APP_USER_ACCESS WHERE 
UPPER(USERNAME) ='" & Ucase(strUserName) & "'"
		strSQL = strSQL & " AND UPPER(PASSWORD) = '" & Ucase
(strPassword) & "'"
		strSQL = strSQL & " AND UPPER(PUSER) = 'Y'"
		strSQL = strSQL & " AND APP_ID = 4"	
	
		''Execute the SQL statement		
		set rs = server.createobject("Adodb.Recordset")	
		rs.Open strSQL, cnn, 3,3	
		intChecked = rs.RecordCount
		if intChecked = 0 then
			'Response.Redirect "Login_hd_en.asp"
			Response.Redirect "TestLoginPage.asp"		
		else
			'Response.Redirect "HelpDeskOnly_hd_en.asp"
			Response.Redirect "TestLogin.asp"
		End if	
	else
		'Response.Redirect "Login_hd_en.asp"
		Response.Redirect "TestLoginPage.asp"	
	end if

Thank you

Anthony

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

  Return to Index