home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 January / PCWorld_2000-01_cd.bin / Software / Vyzkuste / feedback / data1.cab / RoleMaker_Program_Files / template.txt < prev   
Text File  |  1999-11-05  |  7KB  |  177 lines

  1. <html>
  2.  
  3. <head>
  4. <title>Feedback Journal 360 - Feedback Questionnaire - %rolename%</title>
  5. <script language="JavaScript">
  6. <!--
  7. // This section is inserted automatically by RoleMaker
  8. // %questiondata%
  9. // End of RoleMaker inserted section
  10.  
  11. qu_text = new question_data();
  12. qu_resp = new response_data();
  13. qu_no = 0;
  14.  
  15. function set_question()
  16. {
  17.     if (qu_no < qu_text.length)
  18.     {
  19.         document.questionnaire.prompt.value = qu_text[qu_no];
  20.         document.questionnaire.where_at.value = "Question " + (qu_no+1) + " of " + qu_text.length;
  21.         if (qu_resp.length > 0) document.questionnaire.response1.value = qu_resp[0];
  22.         if (qu_resp.length > 1) document.questionnaire.response2.value = qu_resp[1];
  23.         if (qu_resp.length > 2) document.questionnaire.response3.value = qu_resp[2];
  24.         if (qu_resp.length > 3) document.questionnaire.response4.value = qu_resp[3];
  25.         if (qu_resp.length > 4) document.questionnaire.response5.value = qu_resp[4];
  26.         if (qu_resp.length > 5) document.questionnaire.response6.value = qu_resp[5];
  27.     } else {
  28.         document.questionnaire.prompt.value = "All questions answered.  Please press 'Send' once and wait for a reply.";
  29.         document.questionnaire.where_at.value = "All completed";
  30.         document.questionnaire.response1.value = "";
  31.         document.questionnaire.response2.value = "";
  32.         document.questionnaire.response3.value = "";
  33.         document.questionnaire.response4.value = "";
  34.         document.questionnaire.response5.value = "";
  35.         document.questionnaire.response6.value = "";
  36.     }
  37. }
  38.  
  39. function start_questionnaire()
  40. {
  41.     set_question();
  42. }
  43.  
  44. function press_button( answer )
  45. {
  46.     if (answer < qu_resp.length && qu_no < qu_text.length)
  47.     {
  48.         len = document.questionnaire.replies.length;
  49.         start = "";
  50.         end = "";
  51.         if (qu_no > 0) start = document.questionnaire.replies.value.substring(0,qu_no);
  52.         if (qu_no == length) end = document.questionnaire.replies.value.substring(qu_no+1,length-1);
  53.         document.questionnaire.replies.value = start + answer + end;
  54.         qu_no++;
  55.         set_question();
  56.     }
  57. }
  58.  
  59. function go_back()
  60. {
  61.     if (qu_no > 0)
  62.     {
  63.         qu_no--;
  64.         set_question();
  65.     }
  66. }
  67.  
  68. function validate( answer )
  69. {
  70.     if (qu_no < qu_text.length)
  71.     {
  72.         alert( "You haven't yet answered all the questions" ); 
  73.         return false;
  74.     }
  75.     if (document.questionnaire.email.value.length == 0)
  76.     {
  77.         alert( "You must enter the email address for the person to receive the feedback" ); 
  78.         return false;
  79.     }
  80.     if (document.questionnaire.password.value != document.questionnaire.password2.value)
  81.     {
  82.         alert( "The password has been entered differently in each prompt" ); 
  83.         return false;
  84.     }
  85.     if (document.questionnaire.relationship.selectedIndex < 0)
  86.     {
  87.         alert( "You must enter your reporting relationship to the person being assessed" ); 
  88.         return false;
  89.     }
  90.     return true;
  91. }
  92. // -->
  93. </script>
  94. </head>
  95.  
  96. <body OnLoad="start_questionnaire()" bgcolor="#CECEFF">
  97.  
  98. <form method="POST" action="%25CGI%25" name="questionnaire" OnSubmit="return validate()">
  99.   <input type="hidden" name="role" value="%rolename%"><input type="hidden" name="mailserver"
  100.   value="%mailserver%"><input type="hidden" name="from" value="%from%"><input type="hidden"
  101.   name="subject" value="%subject%"><input type="hidden" name="message" value="%message%"><input
  102.   type="hidden" name="replies" value><div align="left"><table border="0" cellpadding="10"
  103.   cellspacing="0" width="100%" bgcolor="#CECEFF" style="font-family: sans-serif">
  104.     <tr>
  105.       <td valign="top" colspan="2"><div align="center"><center><h3><small><font face="Arial">Questionnaire
  106.       for %rolename%</font></small></h3>
  107.       </center></div></td>
  108.     </tr>
  109.     <tr>
  110.       <td valign="top"><small><font face="Arial">Email address to which this feedback will be
  111.       sent:</font></small></td>
  112.       <td valign="top"><input type="text" name="email" size="31" style="font-family: sans-serif"></td>
  113.     </tr>
  114.     <tr>
  115.       <td valign="top"><font face="Arial"><small>Password to protect this feedback (please
  116.       repeat twice):</small><br>
  117.       <small><small><small>The person who asked you to complete this questionnaire will tell you
  118.       what to use.  If not leave it blank.</small></small></small></font></td>
  119.       <td valign="top"><input type="password" name="password" size="31"
  120.       style="font-family: sans-serif"><br>
  121.       <input type="password" name="password2" size="31" style="font-family: sans-serif"></td>
  122.     </tr>
  123.     <tr>
  124.       <td valign="top"><small><font face="Arial">Your name (optional):</font></small></td>
  125.       <td valign="top"><input type="text" name="name" size="31" style="font-family: sans-serif"></td>
  126.     </tr>
  127.     <tr>
  128.       <td valign="top"><small><font face="Arial">Your reporting relationship:</font></small></td>
  129.       <td valign="top"><select name="relationship" size="6" style="font-family: sans-serif">
  130.         <option value="0">Self assessment</option>
  131.         <option value="1">Manager of person being assessed</option>
  132.         <option value="2">Direct report of person being assessed</option>
  133.         <option value="3">Peer of person being assessed</option>
  134.         <option value="4">Customer of person being assessed</option>
  135.         <option value="5">Other</option>
  136.       </select></td>
  137.     </tr>
  138.     <tr>
  139.       <td valign="top" bgcolor="#8080FF" colspan="2"><small><font face="Arial">For the behaviour
  140.       below please click the button on the right that best matches for the person you are
  141.       assessing.  If you make a mistake you can go back  by clicking "Previous
  142.       question".  You must answer all questions before you can send your feedback.</font></small></td>
  143.     </tr>
  144.     <tr>
  145.       <td valign="top" bgcolor="#8080FF"><font face="Arial"><small><textarea rows="4"
  146.       name="prompt" cols="66"
  147.       style="font-family: sans-serif; background-color: rgb(206,206,255); border: 0"></textarea><br>
  148.       <input type="text" name="where_at" size="39" value="Start"
  149.       style="font-family: sans-serif; background-color: rgb(128,128,255); border: 0"></small><br>
  150.       <small><br>
  151.       <input type="button" value="Previous question" name="back" OnClick="go_back()"
  152.       style="font-family: sans-serif"></small></font></td>
  153.       <td valign="top" bgcolor="#8080FF" align="center"><input type="button" value
  154.       name="response1" OnClick="press_button(0)"><br>
  155.       <input type="button" value name="response2" OnClick="press_button(1)"><br>
  156.       <input type="button" value name="response3" OnClick="press_button(2)"><br>
  157.       <input type="button" value name="response4" OnClick="press_button(3)"><br>
  158.       <input type="button" value name="response5" OnClick="press_button(4)"><br>
  159.       <input type="button" value name="response6" OnClick="press_button(5)"></td>
  160.     </tr>
  161.     <tr>
  162.       <td valign="top"><small><font face="Arial">Comments to the person receiving feedback:</font></small></td>
  163.       <td valign="top"><textarea rows="7" name="comments" cols="42"
  164.       style="font-family: sans-serif"></textarea></td>
  165.     </tr>
  166.     <tr>
  167.       <td valign="top"><small><font face="Arial">Press "Send" when all the above
  168.       questions have been answered.</font></small></td>
  169.       <td valign="top"><input type="submit" value="Send" name="Submit"
  170.       style="font-family: sans-serif"></td>
  171.     </tr>
  172.   </table>
  173.   </div>
  174. </form>
  175. </body>
  176. </html>
  177.