Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Passing data between pages...

Posted on 1998-02-06
8
Medium Priority
?
187 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 5

Expert Comment

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

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 600 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

963 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