By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,914 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,914 IT Pros & Developers. It's quick & easy.

ajax checkbox help

P: 1
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
Jan 5 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,329
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:

Expand|Select|Wrap|Line Numbers
  1. function handle_click(node) {
  2.     if (node.checked) {
  3.         // do something
  4.     } else {
  5.         // do something other
  6.     }
  7. }
kind regards
Jan 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.