Solved

Passing data between pages...

Posted on 1998-02-06
8
177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

628 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