Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 22nd, 2005, 12:45 PM
Authorized User
 
Join Date: May 2005
Location: Newark, Ohio, USA.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need a little help


The problem that I am having with this part of the chapter 15 program is after I have logged in with a user name and I am at the “menu for registered users”. If I click on the link “Edit Registration” when it takes me to the Register.asp it doesn’t open the logged in user’s record for edit. It openes the the last recorded added.

What code do I need to open the current record for editing? I have changed the original code and created a new database can you see where I went wrong? Most things work so far I am just not sure how to edit the current user.

Thanks
Mike Drumm







MenuForRegisteredUsers.ASP


<%
  If Session("PersonID") = "" Then
    Response.Redirect "Login.asp"
  End If
%>

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

<BODY BGCOLOR="#FFFF80">
<CENTER><H1> Wrox Classifieds <BR>Registered Users' Menu</H1>
<H3>Welcome <%= Session("FirstName") %></H1>
</CENTER><P>
Thank you for visiting this site. We offer many opportunities :
<UL>
  <LI>Browse
  <LI>Check available dates & times
  <LI>Book an appointment
</UL>

<TABLE BORDER=0 WIDTH=100%>
  <TR ALIGN=CENTER>
    <TD WIDTH=33%><A HREF="BrowseListings.asp">Browse </A></TD>

    <TD WIDTH=33%><A HREF="Register.asp?Update=True">Edit Registration Info</A></TD>
  </TR>
</TABLE>
</BODY>
</HTML>









Register.asp



<BASEFONT FACE="Comic Sans MS" COLOR="DarkBlue">
<HTML>
<HEAD>


<SCRIPT language="JavaScript">



<!--
  function VerifyData()
  {


 if (document.frmUser.Password.value != document.frmUser.VerifyPassword.value)
    {
      alert ("Your passwords do not match - please reenter");
      return false;
    }
    else
      return true;
  }
-->
</SCRIPT>

<TITLE>Wrox Classifieds - User Registration</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFF80">
<CENTER>
<%
  If Request("Update") = "True" Then




    Response.Write "<H1> Wrox Classifieds <BR> Update User Registration</H1>"
  Else
    Response.Write "<H1> Wrox Classifieds <BR> New User Registration</H1>"
  End If
%>
</CENTER>
<P>

<%
  If Request("Update") = "True" Then



 Response.Write "Please change your registration information as listed below<P>"
  Else
    If Request("NotFound") = "True" Then
      Response.Write "<I>We were unable to locate your information. " & _
                     "Please take the time to register again.</I><P>"
    Else
      Response.Write "<CENTER>(If you're already registered with us, " & _
                     "then click the 'Login' link below.)</CENTER><P>"
    End If
    Response.Write "You only need to register with our system if you want to " & _
                   "bid on existing 'for-sale' items, or sell your own items " & _
                   "on these pages. <BR> " & _
                   "In order to use these services, please take a few minutes " & _
                   "to complete the form below. Once you have done that, " & _
                   "you will have full access to the system."
  End If
%>

<FORM ACTION="AddUser.asp" NAME="frmUser" METHOD="POST"
              onSubmit="return VerifyData()">
  <TABLE BORDER=0>
    <TR>
      <TD WIDTH=20% ROWSPAN=11>&nbsp;</TD>
      <TD>E-Mail Address:</TD>
      <TD><INPUT TYPE="Text" NAME="email" VALUE="<%= Session("email")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Given Name:</TD>
      <TD><INPUT TYPE="Text" NAME="FirstName" VALUE="<%= Session("FirstName")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Family Name:</TD>
      <TD><INPUT TYPE="Text" NAME="LastName" VALUE="<%= Session("LastName")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Address:</TD>
      <TD><INPUT TYPE="Text" NAME="Address1" VALUE="<%= Session("Address1")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><INPUT TYPE="Text" NAME="Address2" VALUE="<%= Session("Address2")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>City:</TD>
      <TD><INPUT TYPE="Text" NAME="City" VALUE="<%= Session("City")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>State:</TD>
      <TD><INPUT TYPE="Text" NAME="State" VALUE="<%= Session("State")%>"
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Postal Code:</TD>
      <TD><INPUT TYPE="Text" NAME="Zip" VALUE="<%= Session("Zip")%>"
           SIZE="40"></TD>
    </TR></TR>
    <TR>
      <TD>&nbsp;<P>Password:</TD>
      <TD VALIGN=bottom><INPUT TYPE="Password" NAME="Password"
                         VALUE="<%= Session("Password") %>" SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Verify Password:</TD>
      <TD><INPUT TYPE="Password" NAME="VerifyPassword" SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD ALIGN=CENTER COLSPAN=2><BR>
          <INPUT TYPE="Submit" VALUE="Submit Registration">
              &nbsp;&nbsp;<INPUT TYPE="RESET"></TD>
    </TR>
  </TABLE>
</FORM>


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

</BODY>
</HTML>


  #2 (permalink)  
Old June 11th, 2007, 08:10 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Button code to call URL


I am needing the below button code to call a URL.
The standard refers to calling a java script.

<bi:BUTTON type="COMPOSITE" index="2" >

<bi:CAPTION value="Supporting Data" />

<bi:ACTION type="CHOICE" value="SCRIPT_FUNCTION" >

<bi:SCRIPT_FUNCTION value="javascript:onclick=fn()" />

</bi:ACTION>

</bi:BUTTON>





 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 06:47 AM.


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