Hello,
I need some help with passing a value from my login authorization page.
The authorization is done with the code below (it works), but I need the
'uName' value passed on when the window.location is activated.
I code my ASP with JavaScript NOT vbscript so please no &'s. And yes I
know I should be using a DSN-less connection! ((sorry, everytime I post
I get blasted about my syntax and connection choice :+))
I am slightly baffled with query's and this is what I have tried:
============= taken from code below =============== ===
var memid;
memid = Request.form("u Name");
//Response.write( memid);//THIS PRINTS OUT FINE!!!
Response.write( "<SCRIPT
Language=\"../clientside/clientnewstest1 .asp?MemberID=+ memid\";</SCRIPT>
");//THIS DOES NOT!!
=============== =============== ===============
=============== =============== ============
======== THE WHOLE SECTION ==========
=============== =============== ============
var conn;
var rs;
var sSQL;
conn=Server.Cre ateObject("ADOD B.Connection");
rs=Server.Creat eObject("ADODB. Recordset");
conn.Open("cpWe bdata");
sSQL = "SELECT InvestorAdmin.* ";
sSQL += " FROM InvestorAdmin ";
sSQL += " WHERE MemberID = '" + Request.Form("u Name") + "' ";
sSQL += " AND MemberPW = '" + Request.Form("u Pass") + "';";
rs=Server.Creat eObject("ADODB. Recordset");
rs.Open(sSQL, conn);
//Response.write( sSQL); THIS RETURNS MemberID='undef ined'
if (!rs.eof) {
//User Validated as a record exists in recordset
var memid;
memid = Request.form("u Name");
//Response.write( memid);
Response.write( "<SCRIPT
Language=\"../clientside/clientnewstest1 .asp?MemberID=+ memid\";</SCRIPT>
");
} else {
//Not a valid username or password - THIS WORKS FINE
Response.write( "<SCRIPT Language=JavaSc ript>window.loc ation =
\"loginportfoli o.asp\";</SCRIPT>");
rs.close();
conn.close();
rs=null;
conn=null;
}
=============== =============== =============== ====
=============== END CODE =============== ====
=============== =============== =============== ==
One more thing. My login page is used for two different databases - I
test for one, if false test for the other and if thats false they are
not allowed in. This works, but I just need that one value to go with
it!!
I would appreciate any help with this :+)
Thanks in advance, Miranda
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!