Solved

Passing data between pages...

Posted on 1998-02-06
8
159 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 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