Opening a page with a passed variable

Posted on 1998-07-21
Last Modified: 2010-04-09
I have a page with a variable ( If the user clicks a certain button I need to open another page and still have access to that variable value so that I can later re-open the first page in the same state (the variable is used in an Access query). What is the method of passing a value between pages?
Question by:Helicopter
  • 4
  • 2

Accepted Solution

Christian_Wenz earned 50 total points
ID: 1844762
using JavaScript, you can pass variables: the url changes to to, let's say

so in your case, you have to load the page xxx.html? (in JavaScript, you would use location.href="xxx.html?"+formid or something like that.

On the next page, you can use to get the question mark and everything that follows, in this case ?formid

if you have additional questions or need more detailled code, please leave me a comment.

Expert Comment

ID: 1844763
of course, you could alternatively use a cookie instead
LVL 84

Expert Comment

ID: 1844764
Or, as Experts-Exchange does it, with <input type=hidden>
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails


Expert Comment

ID: 1844765
aargh, how obvious. I completely overlooked that! :-)

Expert Comment

ID: 1844766
aargh, how obvious. I completely overlooked that! :-)

Author Comment

ID: 1844767
Thanks for the input. I had a feeling I'd need hidden fields. If I can just clarify a bit.

booking.htm is created by a cgi routine which runs SQL. This page shows a list of people. It also has a variable . If the user doesn't appear on this list, they go to register.htm and add their details to the server side database. What I would like to happen is, after the registration, reload booking.htm, updated so their name appears in the list. For this I need to be available from register.htm so that I can run the same cgi routine.

I'm not sure how to populate a hidden field with a passed parameter....

Author Comment

ID: 1844768
I'll close this one I think, thanks for the pointers.

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Display multiple images in the row in PHP 11 69
Specific DIV Hyperlink Color 1 42
radio button value 3 46
Change month dropdown 5 17
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

13 Experts available now in Live!

Get 1:1 Help Now