ajax checkbox help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kfir91
    New Member
    • Jan 2008
    • 1

    ajax checkbox help

    ok so this is my q :
    i have database in php information
    i do this :

    [HTML]<input type='checkbox' name='CH' value='$id' />[/HTML]
    i want to do this :
    that i click on some clicker its show all the datebase information that is id
    was checked in the checkbox
    if i didnt check some box its display abd dont show the information
    Last edited by gits; Jan 5 '08, 12:51 PM. Reason: added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    hi ...

    you may use the onclick-handler of the checkbox to call a javascript that starts a XMLHttpRequest to load the content. for the ajax-part have a look at this example ... in case you need help with the handler post back with what you have done so far. remember ... you may ask the box whether it is checked or not ... like:

    [CODE=javascript]function handle_click(no de) {
    if (node.checked) {
    // do something
    } else {
    // do something other
    }
    }
    [/CODE]
    kind regards

    Comment

    Working...