Results 1 to 6 of 6

Thread: Jim

  1. #1
    James Dvorak Guest

    Default Jim

    I want to use ASP to do multi-page forms. Any good examples/tutorials out there?

  2. #2
    Join Date
    Dec 1969

    Default What an informative subject!

    You mean "how do I pass the data from page 1 to page 2 to page n of the form so that, on the last page, it is all there to be posted to the database"?<BR><BR>Do you want to allow the user to go back and change his/her mind about some data in a prior form?<BR><BR>

  3. #3
    James Dvorak Guest

    Default RE: What an informative subject!

    Yes . . . and yes . . .

  4. #4
    Join Date
    Dec 1969

    Default Multi-page forms...

    I don&#039t know of any articles that expressly discuss these, but at least consider these concepts:<BR><BR>(1) You can copy all the form contents of page 1 to page 2 (and so on) easily by creating hidden fields in the subsequent pages.<BR><BR>Like this:<BR><BR>&#060;%<BR>For Each Item in Request.Form<BR>&nbsp;&nbsp;&nbsp;&nbsp;Response.W rite "&#060;INPUT TYPE=HIDDEN NAME=&#039" & Item & "&#039 VALUE=&#039" & Request.Form(Item) & "&#039&#062;"<BR>Next<BR>%&#062;<BR><BR>Works great. If the user pushes the back button, though, he/she will probably get "page expired, repost form?" questions, etc.<BR><BR>(2) The "classic" way to do this is to use a temporary table in a database. As each page is posted, its info is put in the appropriate place in the table. If the user goes back to edit a page, the data is pulled back out of the table.<BR><BR>(3) Variation on (2), for systems that aren&#039t horribly overloaded is to use Session values. Works quite well and less work than using a database.<BR><BR>***********<BR><BR>Those are the only 3 major variants that I know of. Mayhap somebody else will know others and/or point us to an article?<BR><BR>

  5. #5
    SPG Guest

    Default Side note on Option 1 and 3

    Having done option 1 for a "Preview Post" page, you&#039ll need to write a little algorithm that (at very least) encodes quotation marks entered by users -- otherwise it&#039ll screw up the HTML rendering. I found it just as easy to regExp search for all non-word characters and hex-encode those (after hex-encoding the %s that I was using as delimiters...)<BR><BR>Option 3 has a unique sort of issue where, should somebody wander off to read a massive contract your legal group came up with, their session may time out before they get back to your form agreeing to sell their soul. (Why else would you need a massive contract from the legal department?) Although good for metaphysical consumer autonomy, it&#039s bad for business to have this situation occur.<BR><BR>HiH

  6. #6
    James Dvorak Guest

    Default RE: Jim

    Thanks to one and all. Anybody comes across a good article or book on this subject, drop me a line: jdd@jdvorak.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts