Maintaining User checkboxes on page change

Results 1 to 2 of 2

Thread: Maintaining User checkboxes on page change

  1. #1
    Join Date
    Dec 1969

    Default Maintaining User checkboxes on page change

    I have an application where the user checks a checkbox next to each relevant item (a list of sentences) listed on the page to indicate it is relevant to them. Once they check the item as relevant, they can then click a button to Modify the sentence. The modify changes pages to another asp page. When they are done modifying the item, clicking Continue returns them to the list of sentences. <BR><BR>My problem is that when they return, all of the checks they made in the checkboxes have disappeared with the exception of items they have modified (which the app knows were checked because they had to be checked in order to be modified). <BR><BR>Is there a way to keep the user&#039;s checks for the items without having to post them to the database every time they want to modify an item? Specific code woudl be greatly appreciated. Thanks in advance for your help!

  2. #2
    Join Date
    Dec 1969

    Default What you can do is..

    ..when you submit the first page to go to the page where the user can modify the sentence, carry the values of all the checked boxes as a request object collection, are the checkboxes forming an *array*, if so then u will access them on next page as<BR>varchk = request("chkboxarrayname") and then the values will be like e.g<BR>1,2,3,5,6 &#060;-- these checkboxes were checked.<BR><BR>or <BR><BR>if the checkboxes dont form an array then simply find the <BR>request("checkboxname") for each checkbox.<BR><BR>Now when the user modifies the line and goes back to the first page, put the value of all these checkboxes in hidden fields in the same form.<BR><BR>so on the first page you will need to check, <BR>if request("chkfrompage2box") is not "" then <BR> *split* the values and for each element check it against <BR> the values of the checkboxes, if it is equal then "check" <BR> the box. end condition<BR>else<BR>make fresh checkboxes for the user to fill in.<BR>end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts