Forums
This topic is locked
Log in page: Function Usage
Posted 22 Aug 2001 16:58:31
1
has voted
22 Aug 2001 16:58:31 ike austin posted:
Login PageJAVASCRIPT
I created this function ( AccessLevel() ) that is called on a onLoad (When page loads) Event.
After login,, the page is returned to itself along with the MM_Username and MM_UserAuthorizatio values.
(The values do in fact appear on the page where I display them.)
The function should after reading the MM_UserAuthorization value, give an alert message (This is for temp testing only),
In final production it should redirect to new page based on the MM_UserAuthoriazation value recieved.
Each time I run the code nothing happens, no alert message and no page rediretion, however, both MM_UserAuthorization and MM_Username appear as they should.
Are all my coding elements onLoad, functions, etc in the right places?
should the javascript code be somewhere else?
------See code below------
<html>
<head>
<title>AdminLogin</title>
<SCRIPT LANGUAGE ="JAVASCRIPT">
function AccessLevel(){
if("<%=Session("MM_UserAuthorization"%>=="2"{
alert("Admin Level" file://test line only --to be removed
document.location = "adminpage1.asp";
//Response.Redirect(testpage1.asp)
}
}
function AccessLevel(){
if("<%=Session("MM_UserAuthorization"%>=="1"{
alert("Entry Level" file://test line only --to be removed
document.location = "entrylevel_page1.asp";
//file://Response.Redirect(testpage1.asp)
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="AccessLevel()" bgcolor="#FFFFFF" text="#000000">
Need Help
iaustin
<pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code>
Replies
Replied 24 Aug 2001 16:25:47
24 Aug 2001 16:25:47 Waldo Smeets replied:
Topic moved to ASP frum (was posted in client side JavaScript forum)
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>