help needed

Results 1 to 3 of 3

Thread: help needed

  1. #1
    zia Guest

    Default help needed

    I am having a problem<BR>I have a asp page for a manager to register.On that page there will be 7 departments(in form of checkboxes) the manager can choose all or from 1 to 7 depts,on his choice and all the information will go in database.I have made a separate<BR>table in the db for the departments & a separate 1 for other details like name,email etc..<BR>In the dept table I have given the name of the depts like accounts,hrd.... & the value of these columns will be &#039;Y&#039; or &#039;N&#039; if checkbox checked or unchecked.<BR>But when a sub-manager will want to register he will get the asp page where all the managers in the db will be listed & the sub-manager can choose his manager accordindly.On clicking the chosen manager&#039;s name he will come to the registration page(asp page) where he will have to fill all info & he will see only those dept names & checkboxes which that particular manager had chosen & similarly the submanager can choose 1 or all depts(means checkboxes).<BR>I can figure out how to do all till this point but the problem comes in the Update profile page.<BR>In this asp the manager will see his profile & edit it, he can increase/decrease the number of depts checked.Similarly when the sub-manager sees his update profile page he must see that extra<BR>dept checkbox if his manager had added 1 or see a dept less if manager had reduced 1.How do I do this, picking up the checkbox values either &#039;Y&#039; or &#039;N&#039; from the db.<BR>NOTE: Managers update page will be like static,like he will see all 7 depts & only the chosen one&#039;s will be checked meanwhile the sub-managers update page will depend on the managers chosen<BR>depts(only depts chosen by manager to be seen here).Also note the register page & update page will be 2 diff asp files.No probs with register page only update page I wannaa know.Sorry for being lengthy....Anyways any help.

  2. #2
    Join Date
    Dec 1969

    Default RE: help needed

    Use a select statement to get the info out the databasethat you need, Then you should be returning only one recordset. once you have this, you can populate the the checkboxes by saying<BR>&#060;%<BR><BR>if rst("group1") = "y" then<BR>Response.write("&#060;input type=checkbox checked value=y name=group1&#062;")<BR>else<BR>Response.write("&#0 60;input type=checkbox value=y name=group1&#062;")<BR>end if<BR><BR>Then to update, just select the same recordset, and check each value returned, if it is different from DB, then rst.Update, else, nothing!<BR><BR>HTH

  3. #3
    zia Guest

    Default RE: help needed

    Ok Dave Got that............ but how would I take care of the sub-manager&#039;s update page where the checkboxes will come dynamically from the managers chosen list & then update them.<BR>Thanq<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts