Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkboxes and recordsets

Status
Not open for further replies.

craigward

Programmer
Nov 13, 2007
230
0
0
GB
Hi,

I know, i have never used a forum so much :p it's great to have people that can offer advice.

I am looping through a recordset that contains contacts details. Next to each contacts name, there is a checkbox that contains the uniqueid for that record.

onClick of each checkbox that the user selects, the unique id is stored in a session variable, each id is separated by / i.e. uniqueid/uniqueid/uniqueid/ etc.

There could be 50 + pages of records with only a few records selected on each page. I really need to make possible where records have been selected, to have the checkboxes checked, when navigating back through, and if the user un-checks a record that value needs to be removed from the session variable.

This is getting all to technical, and if anyone could point me in the right direction, the correct terminology for what I’m trying to achieve so I can find some help or code samples would be great.

Thanks



Code:
contactid = Request.QueryString("hiddenvalue")
contactid =  contactid & Session("contactids")
	
' Update the session variable
Session("contactids") = contactid
‘response.write(Session("contactids"))


        For I = 1 to objRS.PageSize
          If Not objRS.EOF Then


			strBGcolour = "#D0D0D0"
			
Response.Write("<tr><td bgcolor='" & strBGColour & "'><input type='checkbox' id='checkbox1863' name='checkbox1863' value='" & objRS("uniqueid") & "' onClick='JavaScript:mytester(this.value,this.name)' /></td><td bgcolor='" & strBGColour & "'>" & objRS("contact") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("rooms_from") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("idstatus") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("price_from") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("price") & "</td></tr>")

            objRS.movenext
          end if
        Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top