Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Opening a page with a passed variable

Posted on 1998-07-21
7
Medium Priority
?
240 Views
Last Modified: 2010-04-09
I have a page with a variable (form.id). 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?
0
Comment
Question by:Helicopter
[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
7 Comments
 
LVL 5

Accepted Solution

by:
Christian_Wenz earned 150 total points
ID: 1844762
using JavaScript, you can pass variables: the url changes to www.server.com/page.html to, let's say www.server.com/page.html?yourvariable

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

On the next page, you can use location.search 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.
0
 
LVL 5

Expert Comment

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

Expert Comment

by:ozo
ID: 1844764
Or, as Experts-Exchange does it, with <input type=hidden>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844765
aargh, how obvious. I completely overlooked that! :-)
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844766
aargh, how obvious. I completely overlooked that! :-)
0
 
LVL 8

Author Comment

by:Helicopter
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 ##course.id## . 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 ##course.id## 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....
0
 
LVL 8

Author Comment

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 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