Hi all,
I am having a projectassign page,in that page i am having a dropdown box in which names of the projects are present.I am getting that project names from database. Below that list of users with checkbox are present.
So i can select a project from dropdown and check two users and click submit button,those two users will be assigned to that project.
Every this till this is fine.
Here is my question.Now when i select the same project from dropdown then it should show the two users as checked.and remaining users as unchecked. So anyone can help me please....

7 Years
Discussion Span
Last Post by niths


So every time you select from the combobox you should trigger a function to check with the database whether the project assigned for them. if yes make it select the boxes and disable all the check boxes.

If not, continue to submit the process

Edited by rajarajan07: n/a


1. Add an onchange ajax function in the select box.
2. Take the select drop dwn value through ajax and pass it to the php url.
3. Write a select query to fetch the user id/name for the particular selected project and store it in an array.
4. Another query to fetch all the users
5. users will be listed with a checkbox with for loop
6.Now check inside the loop that whether the user id is present in the array if so, make the checkbox as checked.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.