Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:47:47+00:00 2026-05-23T14:47:47+00:00

I’m using paging which uses a stored procedure to filter by letter. I need

  • 0

I’m using paging which uses a stored procedure to filter by letter. I need to save the values of checkboxes as I submit the form as I filter by letter. I have had a previous question similar to this which worked great but I want to be able to keep my stored procedure.

Stored procedure:

ALTER PROCEDURE [dbo].[A_Page_Paging]
@selected_Char char(1) = null,
@permissionID int = null
as
if @permissionID = ''
    if @selected_Char = '#'
            select * from A_Page where P_Description like '[^a-z]%'
    else if @selected_Char = '!'
            select * from A_Page
            order by P_Description
    else
            select * from A_Page where P_Description like @selected_Char + '%'
else
    select P_PageID, P_Name, P_Description from A_Permission
    inner join L_PagePermission
    on P_PermissionID = PP_PermissionID
    inner join A_Page
    on P_PageID = PP_PageID
    where P_PermissionID = @permissionID
    order by P_Name

Paging buttons:

<input id="buttonStyle" type="submit" name="Paging_Button" value="#">
<% for i = 97 to 122 %>
    <input id="buttonStyle" type="submit" name="Paging_Button" value="<%=CHR(i) %>">&nbsp;
<% next %>
<input id="buttonStyle" type="submit" name="Paging_Button" value="All">

Function to save checkboxes and checkbox (the function will only work for example if I select a checkbox with the value starting with A then filter by A the checkbox will show, if I filter by B it wont):

   'Checkbox check
        Function CheckedByUser(id)
            Dim x
            CheckedByUser = "checked=""checked"""
            For x=1 To Request.Form("selectedRecord").Count
                If Trim(Request.Form("selectedRecord").Item(x)) = Trim(id) Then
                    Exit Function
                End If
            Next
            CheckedByUser = ""
        End Function

<input type="checkbox" name="selectedRecord" value="<%=objRS("P_PageID")%>" <%=CheckedByUser(objRS("P_PageID")) %>>

Previous answer to fix paging problem but requires me to change my stored procedure which i prefer not to do:

<%
Do Until objRS.EOF
    Response.Write("<input type=""checkbox"" name=""selectedRecord"" value=""" & objRS("Id") & """ " & WasCheckedByUser(objRS("Id")))
    If Len(Request.Form("Page"))=1 And Trim(Left(objRS("Id"), 1))<>Trim(Request.Form("Page")) Then
        Response.Write(" style=""display: none;""")
    End If
    Response.Write(" />")
    objRS.MoveNext
Loop
%>

Executing stored procedure

connectionstring = obj_ADO.getconnectionstring
Set objCon = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")
set objComm = CreateObject("ADODB.Command")
objCon.Open connectionstring

objComm.ActiveConnection = objCon.ConnectionString
objComm.CommandText = "A_Page_Paging"
objComm.CommandType = 4


Set objParameter = objComm.CreateParameter
objParameter.Name = "selected_Char"
objParameter.Type = 129
objParameter.Direction = 1
objParameter.Size = 3
objParameter.Value = Selected_Button
objComm.Parameters.Append objParameter

Set objParameter2 = objComm.CreateParameter
objParameter2.Name = "PermissionID"
objParameter2.Type = 129
objParameter2.Direction = 1
objParameter2 .Size = 3
objParameter2 .Value = P_ID
objComm.Parameters.Append objParameter2

set objRS = objComm.Execute
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:47:48+00:00Added an answer on May 23, 2026 at 2:47 pm

    Change this line in your code:

    objParameter.Value = Selected_Button
    

    To this instead:

    objParameter.Value = "!"
    

    The code you already have in the loop should hide the checkboxes that are not part of the current “page”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.