[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

jsp joined menu dropdowns - onChange or an array

Asked by bf109 in Java Server Pages (JSP)

Tags: jsp, onchange

hi
I've been tasked with changing the below code so that the menu boxes interact. They are task and subtasks (if the task has a subtask). It is a means to edit existing tasks - edit portion complete. I'm looking for a way to pull this info out of an Oracle db, first by task which has a dropdown and a "Go" to jump to that task to edit and also display any subtasks that may belong to the task, if any. The subtask needs a dropdown and "Go" button also. If there aren't any subtasks for the selected task, I need the subtask window not to be displayed.
As the tasks are pulled by dept id, there should not be that many entries and maybe an array (pulling all of the dept tasks and subtasks over at once) would be better than a onChange refresh when the task is selected. My SQL,jsp,java (everything I need to know:)) is very limited. Any advice would greatly be appreciated.

Currently this code shows all the tasks and subtasks from a particular DeptID in drop down menus without any correlation between the task and its subtask.

Please give as much code and explanations as possible.

thanks in advance for any assistance and guidance concerning this matter.

<body marginwidth="0" marginheight="0"  topmargin="10" leftmargin="10" bgcolor="#FFFFFF">

<%

      String _username = (String) session.getAttribute("user");
      String _deptid = (String)session.getAttribute("deptid");
      
      if (_username == null) {
            out.print("<script language=\"javascript\">");
            out.print("top.location.href = \"loginfail.jsp\";");
            out.print("</script>");
      }


//      String deptid = request.getParameter("deptid");

      String Dept = StatusSqlBean.returnDeptName(_deptid);
%>

<%
      String reqgroupproj[][] = StatusSqlBean.getGroupProjects(_deptid);
         String groupsubproj[][] = StatusSqlBean.getGroupSubProjects(_deptid);
         
%>
 
<div align="left"> </div>
<div align="left">
<form action="task_edit.jsp" method="post">
  <table border="0" width="565" cellspacing="0" cellpadding="0" height="20">
    <tr>
      <td width="1">
        <p align="right"><font size="3" face="Arial"></font>
      </td>
      <td><font size="2" face="Arial"><b>Status Central: </b>Edit Task - <%= Dept%></font></td>
    </tr>
    <tr><td><input type="hidden" name="department" value="<%= Dept%>"></td></tr>
    <tr>
      <td width="1" height="2">&nbsp;</td>
      <td height="19">
        <hr>
      </td>
    </tr>
    <tr>
      <td width="1" height="19">&nbsp;</td>
      <td height="19"><font face="Arial" size="2">Select Project to Edit:</font></td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td><font face="Arial" size="2">
        <select name="TSKID">

<%
      for (int i = 0; i < reqgroupproj.length; i++) {
%>

<option value="<%= reqgroupproj[i][0] %>"> <%= reqgroupproj[i][1] %> </option>

<%
      }
%>

        </select>
        </font></td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td>
        <input type="submit" value="Submit" name="submit">
      </td>
    </tr>
   
   
  </table>
  </form>
</div>
<div align="left">
   
<br><br>

    <div align="left"> </div>
<div align="left">
<form action="task_edit.jsp" method="post">
<input type=hidden name=subtask value=y>
<input type=hidden name=master value=n>
  <table border="0" width="565" cellspacing="0" cellpadding="0" height="20">
    <tr>
      <td width="1">
        <p align="right"><font size="3" face="Arial"></font>
      </td>
      <td><font size="2" face="Arial"><b>Sub Tasks </b></font></td>
    </tr>
    <tr><td><input type="hidden" name="department" value="<%= Dept%>"></td></tr>
    <tr>
      <td width="1" height="2">&nbsp;</td>
      <td height="19">
        <hr>
      </td>
    </tr>
    <tr>
      <td width="1" height="19">&nbsp;</td>
      <td height="19"><font face="Arial" size="2">Select Sub Task to Edit:</font></td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td><font face="Arial" size="2">
        <select name="SUBID">
       

   <%
   

         
      for (int i = 0; i < groupsubproj.length; i++) {
      
   if (groupsubproj[i][2] != "") {
%>    

   

<option value="<%= groupsubproj[i][2] %>"> <%= groupsubproj[i][3] %> </option>


 
  <%
      } }
%>
 
          </select>
        </font></td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td width="1">&nbsp;</td>
      <td>
        <input type="submit" value="Submit" name="submit">
      </td>
    </tr>
 </table>
</div>
<div align="left">
</form>
 
 
</div>

</body>
</html>
[+][-]03/26/03 07:09 PM, ID: 8215110Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/26/03 08:16 PM, ID: 8215336Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/26/03 08:17 PM, ID: 8215341Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/26/03 08:18 PM, ID: 8215346Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/27/03 04:10 PM, ID: 8221591Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/28/03 05:09 PM, ID: 8228802Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/28/03 07:43 PM, ID: 8229216Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/28/03 08:15 PM, ID: 8229301Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/28/03 08:20 PM, ID: 8229314Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/03 06:46 PM, ID: 8236049Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/30/03 06:46 PM, ID: 8236054Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Java Server Pages (JSP)
Tags: jsp, onchange
Sign Up Now!
Solution Provided By: kennethxu
Participating Experts: 1
Solution Grade: A
 
[+][-]04/16/03 01:44 PM, ID: 8344085Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89