Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2003, 01:35 AM
Authorized User
 
Join Date: Oct 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Object Required???

I keep getting this error and I can't figure out the problem:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/SLU415FL03_amj9157/CaseStudy/amj9157Login.asp, line 35

Code:
<BASEFONT FACE="Comic Sans MS" COLOR="DarkBlue">
<HTML>
<HEAD>
<TITLE>Wrox Classifieds - Login</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFF80">
<CENTER><H1>Wrox Classifieds<BR>Login</H1></CENTER>
<P>
<% 

  If Request("SecondTry") = "True" Then        ' User's second attempt at logging in
    If Request("WrongPW") = "True" Then 
      Response.Write "Invalid Password. Please try again: " & _
                     "if you get it wrong we'll ask you to re-register.<BR>"
    Else
      Response.Write "E-Mail Address not found. Please try again: " & _
                     "if you get it wrong we'll ask you to re-register.<BR>"
    End If
  End If
  Response.Write "Please enter your e-mail address and password " & _
                 "to login to the system."


%>

<FORM ACTION="amj9157CheckLogin.asp<% If Request("SecondTry")="True" Then 
                                 Response.Write "?SecondTry=True"
                               End If %>" METHOD="POST" NAME="frmLogin">
<%
    If Request.Cookies("LoginSaved").HasKeys Then
        Dim email, password
        email = Request.Cookies("LoginSaved")("email")
        password = Request.Cookies("LoginSaved")("password")
        document.frmLogin.email.value = email
        document.frmLogin.Password.value = password
        Call frmLogin.submit()
    End If
%>

  <TABLE BORDER=0>
    <TR>
      <TD>E-Mail Address:</TD>
      <TD><INPUT TYPE="Text" NAME="email" 
          <% If Request("SecondTry") = "True" then %> 
            VALUE="<%= Session("EMailAddress") %>"
          <% End If %> 
          SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Password:</TD>
      <TD><INPUT TYPE="Password" NAME="Password" SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD align=center><INPUT TYPE="Submit" VALUE="Login">&nbsp;&nbsp;
                       <INPUT TYPE="RESET"></TD>
    </TR>
  </TABLE>
</FORM>


<TABLE BORDER=0 WIDTH=100%>
  <TR ALIGN=CENTER>
    <TD WIDTH=33%><A HREF="amj9157BrowseListings.asp">Browse the listings</A></TD>
    <TD WIDTH=33%>Login</TD>
    <TD WIDTH=33%><A HREF="amj9157Register.asp">I'm a new user</A></TD>
  </TR>
</TABLE>

</BODY>
</HTML>
 
Old November 3rd, 2003, 05:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

This code:
        document.frmLogin.email.value = email
        document.frmLogin.Password.value = password
        Call frmLogin.submit()
is client-side DHTML, but you have it within server-side ASP tags. ASP will not know what this means. What are you trying to accomplish with this bit of code? Auto-login if the uid and pwd is stored in a cookie?
 
Old November 3rd, 2003, 11:53 AM
Authorized User
 
Join Date: Oct 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by pgtips
What are you trying to accomplish with this bit of code? Auto-login if the uid and pwd is stored in a cookie?
Yes.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Object required jpaul VB Databases Basics 5 November 14th, 2007 12:10 PM
object required alitoday Classic ASP Components 1 December 28th, 2004 01:17 AM
object required shoakat Classic ASP Databases 7 November 23rd, 2004 07:38 PM
Object required error ?? hman SQL Server ASP 11 June 21st, 2004 10:59 AM
"Object Required" message chacquard Access 2 February 9th, 2004 12:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.