Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Log In button to function 2

Status
Not open for further replies.

ScottNomus

Programmer
Jun 27, 2001
33
US
I am new to the ASP world and I have been given the task of taking one our databases and putting it on the web for our customer to access information concerning thier projects.

I have exported the LogIn Screen form and the Frm_password to ASP files. I can open the pages and it shows the pages fine and I then try clicking on the Login Button but I can not get it to go to the next page to enter in the Company Information, User Name and password.
When just bring up the password form I can not get the submit button to work a validate the Information.

Here is the code to the 4 files exported from Access.
****LogIN Screen.asp****
<HTML>
<HEAD>
<TITLE><!--LOGIN FORM--></TITLE>
</HEAD>
<Body BGCOLOR=WHITE>
<BODY>
<%
Session.timeout = 5
If IsObject(Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)) Then
Set conn = Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)
Else
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;WebCustomer.mdb&quot;,&quot;&quot;,&quot;&quot;
Set Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;) = conn
End If
%>
<OBJECT ID=&quot;LogIn_Screenalx&quot;
CLASSID=&quot;CLSID:812AE312-8B8E-11CF-93C8-00AA00C08FDF&quot;
STYLE=&quot;TOP:0;LEFT:0;&quot;>
<PARAM NAME=&quot;ALXPATH&quot; VALUE=&quot; Customer/LogIn Screenalx.asp&quot;>
</OBJECT>

<BR>
<P ALIGN = CENTER> <A HREF = &quot; TO MENU</A></P>
</BODY>
</HTML>

Here is the code for LogIN Screealx.asp
<%
Session.timeout = 5
If IsObject(Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)) Then
Set conn = Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)
Else
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;WebCustomer.mdb&quot;,&quot;&quot;,&quot;&quot;
Set Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;) = conn
End If
%>
<SCRIPT LANGUAGE=VBScript>
<!--
Sub LogIn_Screenalx_OnLoad()
End Sub

-->
</SCRIPT>
<DIV ID=&quot;LogIn_Screenalx&quot; STYLE=&quot;LAYOUT:FIXED;HEIGHT:684;WIDTH:894;&quot;>
<OBJECT ID=&quot;Label77&quot;
CLASSID=&quot;CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0&quot;
STYLE=&quot;TOP:539;LEFT:84;WIDTH:726;HEIGHT:67;ZINDEX:0;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;12632256&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;Historical Information is only maintained online for 90 days
Should you need older data contact your account manager&quot;>
<PARAM NAME=&quot;ParagraphAlign&quot; VALUE=&quot;3&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;16711680&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;240&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;18876;1742&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;8388635&quot;>
<PARAM NAME=&quot;FontEffects&quot; VALUE=&quot;2&quot;>
</OBJECT>
<OBJECT ID=&quot;open_log_in&quot;
CLASSID=&quot;CLSID:D7053240-CE69-11CD-A777-00DD01143C57&quot;
STYLE=&quot;TOP:437;LEFT:390;WIDTH:120;HEIGHT:42;TABINDEX:1;ZINDEX:1;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;&Log In&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;2147483666&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3120;1092&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;10&quot;>
</OBJECT>
<OBJECT ID=&quot;intro&quot;
CLASSID=&quot;CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0&quot;
STYLE=&quot;TOP:263;LEFT:120;WIDTH:654;HEIGHT:156;ZINDEX:2;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;12632256&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;Welcome to Nomus's interative customer web page.
If you would like to join our select group of customers that are able to inquire on the status of their inventory items, call your account manager at
1-800-849-5748.&quot;>
<PARAM NAME=&quot;ParagraphAlign&quot; VALUE=&quot;3&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;16711680&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;240&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;17004;4056&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;8388635&quot;>
<PARAM NAME=&quot;FontEffects&quot; VALUE=&quot;2&quot;>
</OBJECT>
<OBJECT ID=&quot;ExitButton&quot;
CLASSID=&quot;CLSID:D7053240-CE69-11CD-A777-00DD01143C57&quot;
STYLE=&quot;TOP:491;LEFT:390;WIDTH:120;HEIGHT:42;TABINDEX:0;ZINDEX:3;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;E&xit&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;2147483666&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3120;1092&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;10&quot;>
</OBJECT>
<OBJECT ID=&quot;powerpoint&quot;
CLASSID=&quot;CLSID:D7053240-CE69-11CD-A777-00DD01143C57&quot;
STYLE=&quot;TOP:625;LEFT:324;WIDTH:252;HEIGHT:40;TABINDEX:0;ZINDEX:0;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;View Samples of Our Work&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;2147483666&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;160&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;6552;1040&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;10&quot;>
</OBJECT>
</DIV>

Here is the code for Frm_password.asp
HTML>
<HEAD>
<TITLE><!--LOGIN FORM--></TITLE>
</HEAD>
<Body BGCOLOR=WHITE>
<BODY>
<%
Session.timeout = 5
If IsObject(Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)) Then
Set conn = Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)
Else
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;WebCustomer.mdb&quot;,&quot;&quot;,&quot;&quot;
Set Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;) = conn
End If
%>
<OBJECT ID=&quot;Frm_Passwordalx&quot;
CLASSID=&quot;CLSID:812AE312-8B8E-11CF-93C8-00AA00C08FDF&quot;
STYLE=&quot;TOP:0;LEFT:0;&quot;>
<PARAM NAME=&quot;ALXPATH&quot; VALUE=&quot; Customer/Frm_Passwordalx.asp&quot;>
</OBJECT>

<BR>
<P ALIGN = CENTER> <A HREF = &quot; TO MENU</A></P>
</BODY>
</HTML>

Here is the code for the Frm_passwordalx.asp

<%
Session.timeout = 5
If IsObject(Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)) Then
Set conn = Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;)
Else
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;C:\intetpub\ Customer\WebCustomer.mdb&quot;,&quot;&quot;,&quot;&quot;
Set Session(&quot;C:\intetpub\ Customer\WebCustomer.mdb_conn&quot;) = conn
End If
%>
<SCRIPT LANGUAGE=VBScript>
<!--
<%
If IsObject(Session(&quot;RS_Frm_Password_customer&quot;)) Then
Set tempRS = Session(&quot;RS_Frm_Password_customer&quot;)
Else
sql = &quot;SELECT User_table.Company, User_table.CompanyNum FROM User_table ORDER BY User_table.Company &quot;
Set tempRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
tempRS.Open sql, conn, 3, 3
Set Session(&quot;RS_Frm_Password_customer&quot;) = tempRS
tempRS.MoveFirst
End If
tempRS.MoveLast
%>

Dim customer_tempList(<% =tempRS.RecordCount %>, 2)

<%
tempRS.MoveFirst
I = 0
do while Not tempRS.eof
%>
customer_tempList( <% =I %> , 0)= &quot;<% =tempRS.Fields(0).value %>&quot;
customer_tempList( <% =I %> , 1)= &quot;<% =tempRS.Fields(1).value %>&quot;
<%
tempRS.MoveNext
I = I+1
loop
%>

Sub Frm_Passwordalx_OnLoad()
customer.list = customer_tempList
End Sub

-->
</SCRIPT>
<DIV ID=&quot;Frm_Passwordalx&quot; STYLE=&quot;LAYOUT:FIXED;HEIGHT:228;WIDTH:594;&quot;>
<OBJECT ID=&quot;customer&quot;
CLASSID=&quot;CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3&quot;
STYLE=&quot;TOP:18;LEFT:186;WIDTH:378;HEIGHT:36;TABINDEX:0;ZINDEX:0;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;16777215&quot;>
<PARAM NAME=&quot;DisplayStyle&quot; VALUE=&quot;3&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;ShowDropButtonWhen&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;9828;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;MatchRequired&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;ListRows&quot; VALUE=&quot;8&quot;>
<PARAM NAME=&quot;BoundColumn&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;ColumnCount&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;Width&quot; VALUE=&quot;378;0;&quot;>
<PARAM NAME=&quot;cColumnInfo&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;TextColumn&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;746604571&quot;>
</OBJECT>
<OBJECT ID=&quot;BtnOK&quot;
CLASSID=&quot;CLSID:D7053240-CE69-11CD-A777-00DD01143C57&quot;
STYLE=&quot;TOP:180;LEFT:258;WIDTH:144;HEIGHT:30;TABINDEX:3;ZINDEX:1;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;OK&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;2147483666&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;160&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3744;780&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;10&quot;>
</OBJECT>
<OBJECT ID=&quot;lblPassword&quot;
CLASSID=&quot;CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0&quot;
STYLE=&quot;TOP:114;LEFT:30;WIDTH:150;HEIGHT:36;ZINDEX:2;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;Password:&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3900;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;8388627&quot;>
<PARAM NAME=&quot;FontEffects&quot; VALUE=&quot;2&quot;>
</OBJECT>
<OBJECT ID=&quot;lbl_login&quot;
CLASSID=&quot;CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0&quot;
STYLE=&quot;TOP:66;LEFT:30;WIDTH:150;HEIGHT:36;ZINDEX:3;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;LogIn Name:&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3900;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;8388627&quot;>
<PARAM NAME=&quot;FontEffects&quot; VALUE=&quot;2&quot;>
</OBJECT>
<OBJECT ID=&quot;lblCompany&quot;
CLASSID=&quot;CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0&quot;
STYLE=&quot;TOP:18;LEFT:30;WIDTH:150;HEIGHT:36;ZINDEX:4;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Caption&quot; VALUE=&quot;Company:&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;3900;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;8388627&quot;>
<PARAM NAME=&quot;FontEffects&quot; VALUE=&quot;2&quot;>
</OBJECT>
<OBJECT ID=&quot;password&quot;
CLASSID=&quot;CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3&quot;
STYLE=&quot;TOP:114;LEFT:186;WIDTH:378;HEIGHT:36;TABINDEX:2;ZINDEX:5;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;16777215&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;9828;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;2894088219&quot;>
</OBJECT>
<OBJECT ID=&quot;username&quot;
CLASSID=&quot;CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3&quot;
STYLE=&quot;TOP:66;LEFT:186;WIDTH:378;HEIGHT:36;TABINDEX:1;ZINDEX:6;&quot;>
<PARAM NAME=&quot;BackStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;16777215&quot;>
<PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;FontHeight&quot; VALUE=&quot;200&quot;>
<PARAM NAME=&quot;Font&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;FontName&quot; VALUE=&quot;MS Sans Serif&quot;>
<PARAM NAME=&quot;Size&quot; VALUE=&quot;9828;936&quot;>
<PARAM NAME=&quot;SpecialEffect&quot; VALUE=&quot;2&quot;>
<PARAM NAME=&quot;VariousPropertyBits&quot; VALUE=&quot;2894088219&quot;>
</OBJECT>
</DIV>

THE END OF THE ASP CODES.
Any help will be appreciated being I am a real &quot;NEWBIE&quot; to this ....If you need anything else please let me know and I will do my best to help you out.
 
First of all: i never use ActiveX.
Your LogIN Screealx.asp has a nummber of <OBJECT>'s
each is a button. I do no know the possible PARAM's but i do not see any link to other pages...

In plain HTML you make a button with an <input type=button>
with the OnClick event you tell the page what to do. By using a Cascading Style Sheet (or an inline style=) you can make your button any color/ size etc you want.


br
Gerard
 
Scott,

You should keep it simple. Below are two asp pages that should do what you want.

Cheers
Fengshui1998

<html>
<head>
<title>FirstPage.ASP</title>
</head>
<body>
<form name=&quot;myform&quot; method=&quot;post&quot; action=&quot;nextpage.asp&quot;>
<input type=&quot;text&quot; name=&quot;user&quot; size=30 maxlength=30>
<input type=&quot;password&quot; name=&quot;pwd&quot; size=30 maxlength=30>
<input type=&quot;submit&quot; name=&quot;btn1&quot; value=&quot;Submit&quot;>
</form>
</body>
</html>


<html>
<head>
<title>NextPage.ASP</title>
</head>
<body>
<%
user = request.form(&quot;user&quot;)
pwd = request.form(&quot;pwd&quot;)
'your other code here
%>
</body>
</html>




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top