Guest scooby56 Posted January 2, 2006 Share Posted January 2, 2006 Hi, my first post here. My site has 3-4 pages with several tick boxes on each (like a check list). On the 4th page you have a summary of which items were ticked. I am using an array stored as a session at the moment to remember which tick box was ticked. here is a sample of the code... <% '2 dimensional array represents page and tick number 'first number represents page, second number represents tick on that page dim Page_checks_reference(5,3) ' code to get array info from previous page goes here 'update array Page_checks_reference(2,1) = request.Form("default2_check1") Page_checks_reference(2,2) = request.Form("default2_check2") Page_checks_reference(2,3) = request.Form("default2_check3") 'put array back into session session("StorredArray") = Page_checks_reference response.Write("From previous " & Page_checks_reference(2,1) & "<br />") response.Write("From previous " & Page_checks_reference(2,2) & "<br />") Response.Write("From previous " & Page_checks_reference(2, 3) & "<br />") %><form id="default2" action="default4.aspx" method="post" name="default2.aspx"> <label> <input type="checkbox" name="default3_check1" value="name_default3_check1" /> check for changes</label> <label> <br /> <input type="checkbox" name="default3_check2" value="name_default3_check2" /> Check cables</label><br /> <label> <input type="checkbox" name="default3_check3" value="name_default3_check3" /> PC meet minimum spec?</label> <br /> <br /> <label> <textarea name="textarea" cols="" rows="3"></textarea> </label> <br /> <input type="image" src="content/images/BT_Fusion_logo.jpg" value="submit" alt="submit" /> </form> The problem is that at the moment it has a submit button to pass the data to the next page (POST).I would like the user to be able to click any link on the site and on unloading the page it updates the array (and session) or somehow remembers which ticks have been checked.I had something like this im mind. User clicks link\/causes unload event --> java script:opens pop-up and POSTs check list info\/ \/new page opens ASP runs on in pop up\/ \/new page looks at session array popup gets session array\/ \/ticks relevant boxes in current page updates arrayfrom info storred in session array \/ put array back into session variable \/ close popup Im probably doing this the hardway... feels like it should be easiser. I prefer to use VB in ASP. I use JS on web pages for browser compatibility.Is there a way to store session variables on unload?if i pass to a popup window, what (in that popup window) do i pass the data to, for asp to read it?any help especially with syntax would be appreciated. thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now