Web Analytics Made Easy -
StatCounter How can I make a home page like "page control in VB" - CodingForum

Announcement

Collapse
No announcement yet.

How can I make a home page like "page control in VB"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I make a home page like "page control in VB"

    Hello,

    Any one knows How can I make the page like:


    ______________
    | Step1| | Step2 |
    ----------------------------------------------
    | username .............................................|
    | other Item.... ....................................... |
    | ..............................................................|
    | ............................................................. |
    ------------------------------------------------

    User can first fill in Items in step1 and click step2 , continue fill in items(user can also go back to page 1 when they click it), then submit. All items in page 1 and page2 can be sent to
    "back.asp"?
    How can I do it?

    Many thanks
    Last edited by geqy; Jul 5, 2002, 10:19 AM.

  • #2
    Does a user have to submit Step 1 before getting to Step 2? Are you puttting all this info in a db?
    does this sig match?

    Comment


    • #3
      I hope, the user can switch betwwen these two (or more) steps, and submit togather. just like the Page control in Visual Basic!

      Comment


      • #4
        I can not really think of an easy way to do this since both steps will be submitted together. The way I would do it is have three forms: frmStep1,frmStep2, frmMain.
        Put frmStep1 and frmStep2 in divs and on the Click of Step 1 make the frmStep1 visible , and frmStep 2 hidden vice versa for the click of Step 2. Whenever the user submits the form write some javascript that will pull the form values from frmStep1 and frmStep2 and put them into the frmMain. All the form fields on the Main form will be hidden. I have not tested this.
        does this sig match?

        Comment


        • #5
          I have an Idea.

          Start with "Section 1" The user fills out information and to move on, the user must submit "Section 1" information. after that, that information is in the db. The user can now move to "Section 2".

          "Section 2" will have the next form. The user can fill in information in this form and hit submit, if he wants to go back to "Section 1", he clicks on the tab back to "Section 1", but a popup comes up saying, If you do this without submiting the page you are on, you will lose any new information. The user clicks cancel or ok.

          Ok will take you to "Section 1", cancel will let the user stay still.

          He goes back to "Section 1", the db loads information already entered into the correct fields. Now the user can now hit sumbit with he's changes and the db will update.

          You can see where I am going with this, can you not?
          Morgoth :: Alex Robson
          http://www16.Brinkster.com/TerraFirma/companel/
          ["I have not failed, I have only found 10,000 ways that will not work" - Thomas Edison]
          [color=#8968D8]http[color=#D3ACB8]://[/color]www[color=#FF567E][b].[/b][/color][b]CodingForum.net[/b][color=#69B12D]/[/color][color=#6C8BD0]showthread[/color][color=#8A6D82][b].[/b][/color]php?t=73418[/color] [color=#3A9E7D][b][i]<--- PageNumbers.ASP[/i][/b][/color]

          Comment


          • #6
            Oh, and to make sure information doesn't get mixed up, you might want to make sure there is a user login script working for you. If you need a good working one, you might want to ask whammy for his site, so you can get his.
            Morgoth :: Alex Robson
            http://www16.Brinkster.com/TerraFirma/companel/
            ["I have not failed, I have only found 10,000 ways that will not work" - Thomas Edison]
            [color=#8968D8]http[color=#D3ACB8]://[/color]www[color=#FF567E][b].[/b][/color][b]CodingForum.net[/b][color=#69B12D]/[/color][color=#6C8BD0]showthread[/color][color=#8A6D82][b].[/b][/color]php?t=73418[/color] [color=#3A9E7D][b][i]<--- PageNumbers.ASP[/i][/b][/color]

            Comment


            • #7
              Hi, this is one case where session variables can be of some use. Assign the name/value pairs of each input field to key/value pairs in the session object.

              Here is a variation, though is done in ASP.NET, using a control's ViewState property.


              Using Page State
              aspxtreme

              Comment


              • #8
                you don't need session variables for this:

                step1.asp

                <form name="step1" action="step2.asp" method="post">
                Step 1:<br>
                <input name="user">
                <input name="others">
                ...
                <input type="submit" name="btnStep2" value="Next">
                </form>


                step2.asp

                <form name="step2" action="back.asp" method="post">
                Step 2:<br>
                <input name="otherdata">
                ...
                <!--put data from step1 to hidden fields-->
                <input type="hidden" name="user" value="<%=Request.form("user")%>">
                <input type="hidden" name="others" value="<%=Request.form("others")%>">
                ...

                <input type="button" name="btnStep1" value="Back" onclick="history.back()">
                <input type="submit" name="btnStep2" value="Next">
                </form>

                in the back.asp page, retrieve the data from step2 page and save all of them in the db.
                Glenn
                vBulletin Mods That Rock!

                Comment

                Working...
                X