Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

getting Checkbox value

JunMJunM Member Posts: 31
Hi!

I have a problem about my current project i am suppose to list a 30 record on a page with a checkbox. My problem is how can i get the value of the checkbox i checked. for example i check the checkbox 1, 4, 5, 10, 25 etc. how can i get those value of check then send it to another page. Pls. help me thanks in advance.

Comments

  • raylouwraylouw Member Posts: 30
    : Hi!
    :
    : I have a problem about my current project i am suppose to list a 30 record on a page with a checkbox. My problem is how can i get the value of the checkbox i checked. for example i check the checkbox 1, 4, 5, 10, 25 etc. how can i get those value of check then send it to another page. Pls. help me thanks in advance.
    :


    You have 2 choices depending on what checkboxes you are using, and if you want to post back to the server or not. If you are using asp checkboxes, simply itterate throught the checkboxes and than send the info to the next page on click. If you are using standard textboxes you can a) rely on the form to post the data or b) use javascript to itterate through the checkboxes and then post the relevant data to the next page. This is up to you.
  • Subrojit MitraSubrojit Mitra Member Posts: 3
    : Hi!
    :
    : I have a problem about my current project i am suppose to list a 30 record on a page with a checkbox. My problem is how can i get the value of the checkbox i checked. for example i check the checkbox 1, 4, 5, 10, 25 etc. how can i get those value of check then send it to another page. Pls. help me thanks in advance.
    :


    Hi,

    I m assuming that u r working on a .asp page. Try this code snippet.


    HTML PART -
    ur looping statement
    icount = icount + 1
    " value="<%=rs("productid")%>">
    " value="1" <%if rs("blabla") = "1" then%>checked<%end if%>>
    ur looping statement complete



    Server Side Code -
    for k=1 to Request("iCount")
    response.write Request("pid_"&k)
    response.write Request("blabla_"&k)
    'Ur Code
    Con.execute qry
    next


Sign In or Register to comment.