Solved

Saving Form Data when Leaving Page

Posted on 2014-03-04
3
362 Views
Last Modified: 2016-03-24
Hopefully, I can explain this question clearly. I have a membership form (yes, same old membership form) that allows the applicant to specify a membership type, buy a few different items and make donation(s). After making the selection(s), there is an option to "Add to Cart" or go directly to PayPal for payment. If "Add to Cart" is select the selection(s) are stored in a PayPal form and a second membership with the optional selection may be made. Up to 5 memberships are allowed. This process has been working for some years. We are now updating our process to handle renewals. The applicant's information is retrieved from an Access database.

My quandary is that the organization wants the form to work for up to 5 renewals as it always has for memberships. In order to handle the renewal, I'm creating a master selection list based on last name. The associated member ID is used to retrieve the applicant's renewal information. If I process one membership, save the data, display a last name member list for the next renewal, I, of course, lose the saved membership information. Is there a solution for this?

I've considered trying to display the last name selection list on the membership form, but have not figured out how to do this yet.  It appears it might work if I could do a "Back" but I don't see a way to click on the selected name and accomplish a "Back."

Here is the list link that is clicked on:

              <td height="40" align="center" class="links"><a href="membershipAssign2.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "memberID=" & rsMembers.Fields.Item("memberID").Value %>"><%=(rsMembers.Fields.Item("memberID").Value)%></a></td>
0
Comment
Question by:slegy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 350 total points
ID: 39905449
I forgot what you mean by a membership.  Is that one person for 5 years?  Or one person, 5 boats for one year?

I would set up my tables like this:

Contacts {
   ID
   FamilyID (Make a new contact from the same family)
   Name
   Address
   Email
   Phone
}

Boats {
   BoatID
   ContactID (or FamilyID)
   Boat_info
}

Products{
   ID
   Name (2014 Master membership, Donations,book)
   Type  (Membership, books)
   Price
}

Membership{
   ID
   ContactID
   StartDate
   EndDate
   Status
}
MembershipTrans{
  Multiple transactions to one membership  
   ID
   MemberhsipID
   ProductID
   AmountCharged
   Discount
}
MembershipContacts{
List of people covered under membership
   ID
   MembershipID
   ContactID
}
MembershipBoats{
List of boats covered under membership
   ID
   MembershipID
   BoatID
}
Payments{
   ID
   Amount
   PaymentType
   ApplyToMembershipID
}

The membership/member trans is basically a sales order/sales transaction.  Payments get applied to the salesorder/membership.

When it comes to renewal, you can either think in terms of 1 membership per year or a start and end date and allow for 2,3,4,5 or 10 years.  If you want to keep one membership per year and allow purchasing of 5 memberships, you would just loop through 5 times. You would need to create a new membership ID first and use that in each loop.
0
 

Author Comment

by:slegy
ID: 39917609
I may have again worded my question unclearly. The membership processing and the table structures are working as designed. The next enhancement we want to make is the allow up to 5 annual memberships to be entered prior to handing them in bulk to PayPal (as new membership currently works). That involves leaving the membership form and doing name lookup, meaning information entered needs to be saved. I'm currently testing with session variables and it appears that this will work as needed. Thank you for your thoughtful attention to this question.
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 350 total points
ID: 39917795
I think what I am getting at is  part of the solution is the set up.  There are no right or wrong answers and many ways to get to a similar outcome.

Since sessions can break an alternative is write the data to the db, mark it not paid.  Then when paypal hits your return url, update the db and mark it paid/add a payment.  One potential problem with storing a session is you are relying on the purchaser to still be there.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
rebind a grid after user clicks on node in treeview 1 52
Save ms data to server side. 19 64
Weighted Randomizing 6 38
SQL to JSON 14 65
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question