Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2008, 08:44 AM
Authorized User
 
Join Date: Aug 2008
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retreival of values from History in ASP

Hello All,

I have a form where i have a dynamic dropdowm box.

On selection of Ist box values the second combobox gets populated.

Everything is fine here. On submit of this page, the form moves to another where the user previews his details.

The problem here is once the user say back/previous, the user moves to the form
where all the fields are populated as the user selected previously but the dynamic box remains blank till the user selects some other values and then the values he requires.

I know on clicking back the form uses history(-1) function, where it is not possible to retrieve the dynamic values.

Could sessions be used here, if yes/or no please help me?


Thank you!!

 
Old December 12th, 2008, 06:08 AM
Authorized User
 
Join Date: Aug 2008
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello All,

any help or suggestions?
 
Old December 16th, 2008, 05:35 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

One way could be to pass the values back to the original page using query strings.

It is a tad draconian but would work.

Cheers

Aspless
 
Old December 16th, 2008, 08:12 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The only way Aspless's solution would work (that I can see) is if the user were to use some sort of on page navigation (a button or link) that would link back to the first form. If the user hits the 'Back' button in the browser there is no way for you to control what is passed in the query string. Furthermore, hitting the back button in your browser pulls the pages from the browser cache thus the page isn't actually reloaded.

What might resolve your problem is to set some sort of Session variable with the value you are interested in and set the first form page to not cache; this would mean every time someone goes to that page it would have to be served up from the Web Server and not pulled from the browser cache. You would merely need to check for the existence of this session value and, if it is present, populate the box otherwise leave it alone.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagridview popualtion and retreival amber_1904 Beginning VB 6 1 October 17th, 2006 05:58 PM
history.back(-1); elania Javascript How-To 3 February 2nd, 2005 03:14 PM
History data stagedancer SQL Server 2000 2 December 8th, 2004 09:57 AM
Window.History pvasudevan Javascript 5 September 4th, 2004 03:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.