Solved

Passing data between pages...

Posted on 1998-02-06
8
162 Views
Last Modified: 2013-12-25
I am setting up a customization page.  The page has options with checkboxes.  There is a submit button which processes the options.  This all works fine.  The issue:  When the user clicks on one of the options, I want it to be a link to a set of sub-options.  These sub-options also have checkboxes and a submit button.  This submit button will take the user back to the main options page.  When the user goes back to the main options page, I would like the options checkboxes to remember which ones were checked before the user went to the sub-options.
Example:

X Option1
_ Option2
X Option3
_ Option4

When the user clicks on the link "Option3", they will go to a page which has:
_ sub-option1
_ sub-option2
[submit]
When they hit submit, they go back to the main option page.

How can I keep the options around?  How can I let the options page know about the sub-options which have been selected?
0
Comment
Question by:jmills99
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1831957
Hidden fields.

Feel free to go deeper into the question.

Regards
0
 

Author Comment

by:jmills99
ID: 1831958
I don't think I can use hidden fields, because I don't know what the values will be until the user selects the checkboxes.  Basically, I like to think of it this way... I have ONE form with a bunch of checkboxes, BUT it is on multiple pages. The user can go back and forth between the pages and all the information needs to be persistent until the submit button on the master options page is pushed.  I was thinking along the lines of each link to the sub-pages actually being calls to a CGI which would read in all the data on the master page and pass it to the sub pages which could pass it back.  But, without each link being a submit button, I can't get the data from the other form elements...  Does this help?
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831959
> each link to the sub-pages actually being calls to a CGI which would read in all the data on the master page and pass it to the sub pages which could pass it back

well, this seems the easier way, and it's what i meant.

When you push submit on a sub-page, you can pass back the whole data only if it is stored somewhere on the form itself: hidden fields.

-julio
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831960
BTW, how did you make your checkboxes be links either?
Javascript events?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:jmills99
ID: 1831961
So, can I make a link act as a submit button?  Or an image?  I don't think they'll go for a page with a bunch of buttons with checkboxes?
0
 
LVL 32

Expert Comment

by:jhance
ID: 1831962
To make an image act like a submit button:

<input type="image" SRC="image.gif" height=22 width=72 BORDER=0 ALIGN=absmiddle>

Put this in your form.  When it is clicked, the form will be submitted.
0
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 1831963
Back to your original question about passing data between pages.  There are 3 ways to do this:

1) HIDDEN inputs.  This was mentioned but not explained very well.  As each page of the data is filled out and sent back to the server, the next page is displayed in the brower with the last (and all prior) sets of data included as hidden inputs.  When you get to the final page of user input, the last submit sends all of the data at once to the server for final processing.

2) Page scripting in JavaScript or VBScript.  Here you can store things in "Hidden Pages" for transport from one page to the next.  I've not done this but there was a good article about it recently in PC Magazine.  I'm not sure but I believe it was in a 1998 issue.

3) Server control with cookies.  If you have control of the server environment, this it probably the cleanest.  It depends, of course, on the user accepting the cookie.  All web servers of common use (for real server use) support these now.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831964
What programming language are you going to use to build your CGI?
Do you need a sample?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now