Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with an input form needed

    I modified a javascript that has worked for gather up input from check boxes with values of 0 and one.
    I am trying to get it to take 0,1,2, and 3 as acceptable values and parse them but it won't.
    I am NOT a coder but have had luck in the past tweaking other code to serve the purpose I needed. If someone has an idea of what the problem is I would appreciate any input...

    The page is http://change-your-mind.org/pages/depression.html
    and the basic form I modified is at http://change-your-mind.org/pages/dast.html

    (be aware that the form that works takes a few seconds to function, I think that's a server issue though)

    Thanks in advance for any help...
    Pablo

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    Code:
    <HTML><HEAD><title>Depression Inventory</title><meta name="description" content="This online test can help you evaluate a possible depression problem "><meta name="keywords" content="Change your Mind, chemical dependency, alcohol abuse, alcohol abuse prevention, drug abuse, drug abuse prevention, chemical addiction, residential chemical dependency, outpatient chemical dependency, drug treatment, alcohol treatment, drug addiction, alcohol addiction, alcoholic, alcoholics anonymous, depression, anxiety, bi-polar disorder, ADD, ADHD, mental health testing">
    <link REL="StyleSheet" TYPE="text/css" HREF="style.css">
    <script language="JavaScript">
    <!--
    function resultat(){
    var zxcresul=0;
     var zxceles=document.fom
    
     for (var zxc0=1;zxc0<22;zxc0++){
      var zxcrads=document.fom['radio'+zxc0];
      for (var zxc0a=0;zxc0a<zxcrads.length;zxc0a++){
       if (zxcrads[zxc0a].checked){
        zxcresul+=zxcrads[zxc0a].value*1;
       }
      }
     }
    var zxcmess=[]
    if (zxcresul < 11) {
    zxcmess.push("<font size=3 color=white>These emotional ups and downs are most likely normal")
    
                }
    if ((zxcresul > 10) && (zxcresul < 17)){
    zxcmess.push("<font size=3 color=white>You appear to be suffering from a mild mood disturbance. Give yourself a treat, take a walk or talk to a friend. Try to change your thought patterns.")
    
    
    }
    if ((zxcresul > 16) && (zxcresul < 21)){
    zxcmess.push("<font size=3 color=white>You are on the borderline between mild, possibly situational depression and clinical depression. If you find youself in this state persistently you would possibly benefit from seeking professional help")
    }
    
    if ((zxcresul > 20) && (zxcresul < 31)){
    zxcmess.push("<font size=3 color=white>You are suffering from moderate depression and if you have NOT recently had a serious negative life experience that could be the cause you would probably benefit from seeking professional help")
    }
    
    if ((zxcresul > 30) && (zxcresul < 41)){
    zxcmess.push("<font size=3 color=white>You are suffering from severe depression and if left untreated it could possibly lead to serious medical as well as emotional problems. You could definitely benefit by seeking professional help and support")
    }
    
    if (zxcresul > 40) {
    zxcmess.push("<font size=3 color=white>You are suffering from extreme depression and should talk to a health professional immediately. You may feel that this is too hard to do, or would not help if you did but that is the depression and the reason you should get it done. Call a family member or close friend to help you if you need to but get help as soon as possible. ")
    }
    
            zxcmess.push("</font></center>")
            zxcmess.push("</font></center></TD></TABLE><center><BR><BR>")
      zxcmess.push("<FONT FACE=arial><A HREF=dast.html class=LgLink>Take the test again</A></font>")
    
    alert(zxcmess.join('\n'));
    // you will need to write zxcmess.join('')
    
            }
    
    //--></script>
    </HEAD>
    <BODY BGCOLOR=#ffffff LEFTMARGIN="0">
    
    <CENTER><br>
    <TABLE WIDTH=60% BGCOLOR=#7281a3 ALIGN=CENTER><TD ALIGN=CENTER>
    <font size="5" color="#ffffff" face="verdana, rial,times new roman">Depression Self Screen</font></TD></TABLE>
    <FONT FACE="arial" size="2" color="#000000">
    Answer all the following questions and then push the
     "result" <br>button at the end of the questionnaire to get your score.</FONT>
    <br><br>
    
    <FORM name=fom>
    <TABLE  WIDTH=600 ALIGN=center ><TR> <TD width=500 VALIGN=top>
    
    <FONT FACE=ARIAL SIZE=4>1. Do you ever feel sad?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio1  VALUE="0" checked>
    <FONT FACE=ARIAL>Not often<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="2">I am sad all the time and I can't snap out of it.<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="3">I am so sad and unhappy that I can't stand it.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>2. Are you ever discouraged about the future?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio2  VALUE="0" checked>
    <FONT FACE=ARIAL>No<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="2">I feel I have nothing to look forward to.<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="3">I feel the future is hopeless and that things cannot improve. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>3. Do you ever feel like a failure?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio3  VALUE="0" checked><FONT FACE=ARIAL>No<br>
    
    <INPUT TYPE=radio NAME=radio3  VALUE="1">I feel like I fail more than the average person<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="2">As I look back on my life, all I can see is a lot of failures.<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="3">I feel I am a complete failure as a person.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>4. Do you usually find enjoyment and satisfaction in your life?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio4  VALUE="0" checked><FONT FACE=ARIAL>Usually I do<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="1"> I don't enjoy things the way I used to.<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="2">I don't get real satisfaction out of anything anymore.<br>
    
    <INPUT TYPE=radio NAME=radio4  VALUE="3">I am dissatisfied or bored with everything.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>5. Do you feel guilty about things you have or haven't done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio5  VALUE="0" checked><FONT FACE=ARIAL>I don't feel particularly guilty<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="1"> I feel guilty a good part of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="2">I feel quite guilty most of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="3">I feel guilty all of the time.
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>6. Do you feel like you are being punished for something?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio6  VALUE="0" checked><FONT FACE=ARIAL>I don't ever feel like I am being punished<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="1"> I feel I may be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="2">I expect to be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="3">I <u>am</u> being punished
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>7. Do you feel disappointmed with yourself ??</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio7  VALUE="0" checked><FONT FACE=ARIAL>I never feel disappointmed with myself ?<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="1">I seldom feel disappointed in myself<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="2">I am disgusted with myself.<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="3">I hate myself
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>8. Do you feel like you are inferior to other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio8  VALUE="0" checked><FONT FACE=ARIAL>I don't feel I am any worse than anybody else<br>
    
    <INPUT TYPE=radio NAME=radio8  VALUE="1"> I am critical of myself for my weaknesses or mistakes.<br>
    <INPUT TYPE=radio NAME=radio8  VALUE="2">I blame myself all the time for my faults.<br>
    <INPUT TYPE=radio     NAME=radio8  VALUE="3">I  blame myself for <u>everything</u> bad that happens. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>9. Have you ever thought of killing yourself?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio9  VALUE="0" checked><FONT FACE=ARIAL>I never have any thoughts of killing myself.<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="1"> I have thought of killing myself but I would <u>never</u> do it.<br>
    
    <INPUT TYPE=radio NAME=radio9  VALUE="2">I would like to kill myself<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="3">I  <u>would</u> kill myself if I had the chance
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>10. Do you find yourself crying a lot for no real reason?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio10  VALUE="0" checked><FONT FACE=ARIAL>I don't cry any more than usual.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="1"> I cry more now than I used to.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="2">I cry all the time now.<br>
    
    <INPUT TYPE=radio NAME=radio10  VALUE="3">I used to be able to cry, but now I can't cry even though I want to.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>11. Do you find yourself often feeling irritated or annoyed?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio11  VALUE="0" checked><FONT FACE=ARIAL>I am no more irritated by things than I ever was.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="1">I am slightly more irritated now than usual.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="2"> I am quite annoyed or irritated a good deal of the time.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="3">I feel irritated all the time.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>12. Have you lost interest in other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio12  VALUE="0" checked><FONT FACE=ARIAL>No, I'm still interested inother people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="1">  I am less interested than I used to be.<br>
    <INPUT TYPE=radio NAME=radio12 VALUE="2"> I have lost a lot of interest in other people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="3">I have lost <u>all</u>interest in other people.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>13. Do you find you have difficulty making decisions?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio13  VALUE="0" checked><FONT FACE=ARIAL>I make descisions as well as I ever have.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="1">  I put off making decisions more than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="2"> I have greater difficulty making decisions than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="3">I can't make decisions at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>14. Do you think you look worse physically than you should?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio14  VALUE="0" checked><FONT FACE=ARIAL>I don't think I look any worse than I used to.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="1">  I am worried that I am looking old and/or unattractive.<br>
    
    <INPUT TYPE=radio NAME=radio14  VALUE="2"> I think I have become physically unattractive and can't reverse it.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="3">I think I an ugly.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>15. Do you problems getting to work or getting your work done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio15  VALUE="0" checked><FONT FACE=ARIAL>I work as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="1">I have to make an extra effort to get started doing something.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="2"> I have to push myself very hard to get anything done.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="3">I can't get <u>any</u> work done.
    
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>16. Do you difficulties sleeping?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio16  VALUE="0" checked><FONT FACE=ARIAL>I sleep as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="1">I don't sleep as well as I used to.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="2">I wake up 1-2 hours early and find it hard to get back to sleep.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="3">I can only sleep a couple of hours a night... if at all. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>17. Do you find yourself getting tired more often or easily?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio17  VALUE="0" checked><FONT FACE=ARIAL>I don't get tired anymore than usual.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="1">I get tired more easily than I used to.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="2"> I get tired from doing almost <u>anything</u>.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="3">I am <u>too</u> tired to get anything done.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>18. Have you lost your appetite for food?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio18  VALUE="0" checked><FONT FACE=ARIAL>My appetite is the same as usual.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="1">My appetite is not as good as it used to be.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="2"> I am seldom hungry.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="3">I have no appetite at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>19. Have you been unintentionally losing weight recently ?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio19  VALUE="0" checked><FONT FACE=ARIAL>I haven't lost much weight, if any.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="1">I have lost more than 5 pounds.<br>
    
    <INPUT TYPE=radio NAME=radio19  VALUE="2"> I have lost more than 10 pounds.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="3">I have lost more than 15 pounds.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>20. Do you difficulties sleeping?</FONT><p>
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio20  VALUE="0" checked><FONT FACE=ARIAL>My health is fine.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="1">I am worried about physical problems like aches and pains and/or digestive problems.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="2"> I have a hard time thinking of anything but my health problems.<br>
    <INPUT TYPE=radio NAME=radio20 VALUE="3">I am so worried about my health that I can't think of anything else. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>21. Are you less interested in sexual activity than usual?</FONT><p>
    
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio21  VALUE="0" checked><FONT FACE=ARIAL>I haven't noticed any recent change in my interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="1">I am less interested in sex than I used to be.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="2">I have almost no interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="3">I have lost all interest in sex completely. </TD></TR></TABLE><br>     <br>
    <INPUT TYPE=button value="Result" onClick='resultat()'>     <INPUT TYPE=reset value="Reset"></FORM><br><BR><font size="-1"><i>FROM: Beck, A.T., Ward, C. H., Mendelson, M., Mock, J., & Erbaugh, J. <br>(1961) An inventory for measuring depression. Archives of General Psychiatry 4, 561-571.</i></font><BR></center></BODY></HTML>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #3
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks but...

    The code seems to work but it's now set to open a pop up rather than write to itself and generate the resultt in HTML.

    I tried replacing all the "var zxcmess=[]" with "self.document.open()" and the "zxcmess.push" commands with "self.document.writeln" and the form seemed to parse...I got not javascrpt error message but it didn't write to the document either.

    Any suggestions...

  • #4
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    your original code for the new window works fine apart from the back to form bit

    but again dont think this is the best method

    just replace this pary of my code with the original

    If interested in my preference, say

    btw the forth radio7 button is names radio 6 in your original code

    and if ((resul > 40) {

    should be

    if (resul > 40) {
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #5
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Still confused

    I'm not sure which part of your code to replace with the original.

    I used your code and it worked great except for the pop up and tried replacing the mess.push commands with document.open command from the original but am obviously missing something. Here is the whole mess....minus the radio buttons....

    <script language="JavaScript">
    <!--
    function resultat(){
    var zxcresul=0;
    var zxceles=document.fom

    for (var zxc0=1;zxc0<22;zxc0++){
    var zxcrads=document.fom['radio'+zxc0];
    for (var zxc0a=0;zxc0a<zxcrads.length;zxc0a++){
    if (zxcrads[zxc0a].checked){
    zxcresul+=zxcrads[zxc0a].value*1;
    }
    }
    }
    self.document.open()
    self.document.writeln("<HTML><HEAD><TITLE>Drug Use Questionnaire</TITLE><link REL=StyleSheet TYPE=text/css HREF=adapt.css></HEAD>")
    self.document.writeln("<BODY BACKGROUND=images/background.gif BGCOLOR=#ffffff TOPMARGIN=0 LEFTMARGIN=0>")
    self.document.writeln("<BR><BR><CENTER><TABLE ALIGN=CENTER BGCOLOR=#7281a3 CELLSPACING=20 WIDTH=350><TD ALIGN=CENTER><font size=3 color=white face=arial>Your score :<BR><font size=6 color=white>")

    self.document.writeln(resul)
    self.document.writeln("<br></font>")

    if (zxcresul < 11) {
    self.document.writeln("<font size=3 color=white>These emotional ups and downs are most likely normal")

    }
    if ((zxcresul > 10) && (zxcresul < 17)){
    self.document.writeln("<font size=3 color=white>You appear to be suffering from a mild mood disturbance. Give yourself a treat, take a walk or talk to a friend. Try to change your thought patterns.")


    }
    if ((zxcresul > 16) && (zxcresul < 21)){
    self.document.writeln("<font size=3 color=white>You are on the borderline between mild, possibly situational depression and clinical depression. If you find youself in this state persistently you would possibly benefit from seeking professional help")
    }

    if ((zxcresul > 20) && (zxcresul < 31)){
    self.document.writeln("<font size=3 color=white>You are suffering from moderate depression and if you have NOT recently had a serious negative life experience that could be the cause you would probably benefit from seeking professional help")
    }

    if ((zxcresul > 30) && (zxcresul < 41)){
    self.document.writeln("<font size=3 color=white>You are suffering from severe depression and if left untreated it could possibly lead to serious medical as well as emotional problems. You could definitely benefit by seeking professional help and support")
    }

    if (zxcresul > 40) {
    self.document.writeln("<font size=3 color=white>You are suffering from extreme depression and should talk to a health professional immediately. You may feel that this is too hard to do, or would not help if you did but that is the depression and the reason you should get it done. Call a family member or close friend to help you if you need to but get help as soon as possible. ")
    }

    self.document.writeln("</font></center>")
    self.document.writeln("</font></center></TD></TABLE><center><BR><BR>")
    self.document.writeln("<FONT FACE=arial><A HREF=dast.html class=LgLink>Take the test again</A></font>")


    }

    //--></script>

  • #6
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #7
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    posted my suggestion anyway in case of interest

    Code:
    <HTML><HEAD><title>Depression Inventory</title><meta name="description" content="This online test can help you evaluate a possible depression problem "><meta name="keywords" content="Change your Mind, chemical dependency, alcohol abuse, alcohol abuse prevention, drug abuse, drug abuse prevention, chemical addiction, residential chemical dependency, outpatient chemical dependency, drug treatment, alcohol treatment, drug addiction, alcohol addiction, alcoholic, alcoholics anonymous, depression, anxiety, bi-polar disorder, ADD, ADHD, mental health testing">
    <link REL="StyleSheet" TYPE="text/css" HREF="style.css">
    <script language="JavaScript">
    <!--
    function resultat(reset){
     var zxcmessage=document.getElementById('Message');
     zxcmessage.style.visibility='hidden';
     var zxcresul=0;
     for (var zxc0=1;zxc0<22;zxc0++){
      var zxcrads=document.fom['radio'+zxc0];
      if (reset){
       zxcrads[0].checked='checked';
      }
      else {
       for (var zxc0a=0;zxc0a<zxcrads.length;zxc0a++){
        if (zxcrads[zxc0a].checked){
         zxcresul+=zxcrads[zxc0a].value*1;
        }
       }
      }
     }
     if (reset){ return; }
     var zxcmess='These emotional ups and downs are most likely normal';
     if (zxcresul>10){
      zxcmess='You appear to be suffering from a mild mood disturbance. Give yourself a treat, take a walk or talk to a friend. Try to change your thought patterns.';
     }
     else if (zxcresul>16){
      zxcmess='You are on the borderline between mild, possibly situational depression and clinical depression. If you find youself in this state persistently you would possibly benefit from seeking professional help';
     }
     else if (zxcresul>20){
      zxcmess='You are suffering from moderate depression and if you have NOT recently had a serious negative life experience that could be the cause you would probably benefit from seeking professional help';
     }
     else if (zxcresul>30){
      zxcmess='You are suffering from severe depression and if left untreated it could possibly lead to serious medical as well as emotional problems. You could definitely benefit by seeking professional help and support';
     }
     else if (zxcresul>40){
      zxcmess='You are suffering from extreme depression and should talk to a health professional immediately. You may feel that this is too hard to do, or would not help if you did but that is the depression and the reason you should get it done. Call a family member or close friend to help you if you need to but get help as soon as possible. ';
     }
     var zxcspans=zxcmessage.getElementsByTagName('SPAN')
     zxcspans[0].innerHTML=zxcresul;
     zxcspans[1].innerHTML=zxcmess;
     zxcmessage.style.width=zxcBdyWH()[0]+'px';
     zxcmessage.style.height=zxcBdyWH()[1]+'px';
     zxcmessage.style.visibility='visible';
     window.scroll(0,0);
    
    
            }
    
    //-->
    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    
    function zxcBdyWH(){
    if (document.body.scrollHeight>document.body.offsetHeight){ return [document.body.scrollWidth,document.body.scrollHeight]; }
     return [document.body.offsetWidth,document.body.offsetHeight];
    }
    
    
    
    //-->
    </script></HEAD>
    <BODY BGCOLOR=#ffffff LEFTMARGIN="0">
    
    <CENTER><br>
    <TABLE WIDTH=60% BGCOLOR=#7281a3 ALIGN=CENTER><TD ALIGN=CENTER>
    <font size="5" color="#ffffff" face="verdana, rial,times new roman">Depression Self Screen</font></TD></TABLE>
    <FONT FACE="arial" size="2" color="#000000">
    Answer all the following questions and then push the
     "result" <br>button at the end of the questionnaire to get your score.</FONT>
    <br><br>
    
    <FORM name=fom>
    <TABLE  WIDTH=600 ALIGN=center ><TR> <TD width=500 VALIGN=top>
    
    <FONT FACE=ARIAL SIZE=4>1. Do you ever feel sad?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio1  VALUE="0" checked>
    <FONT FACE=ARIAL>Not often<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="2">I am sad all the time and I can't snap out of it.<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="3">I am so sad and unhappy that I can't stand it.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>2. Are you ever discouraged about the future?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio2  VALUE="0" checked>
    <FONT FACE=ARIAL>No<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="2">I feel I have nothing to look forward to.<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="3">I feel the future is hopeless and that things cannot improve. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>3. Do you ever feel like a failure?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio3  VALUE="0" checked><FONT FACE=ARIAL>No<br>
    
    <INPUT TYPE=radio NAME=radio3  VALUE="1">I feel like I fail more than the average person<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="2">As I look back on my life, all I can see is a lot of failures.<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="3">I feel I am a complete failure as a person.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>4. Do you usually find enjoyment and satisfaction in your life?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio4  VALUE="0" checked><FONT FACE=ARIAL>Usually I do<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="1"> I don't enjoy things the way I used to.<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="2">I don't get real satisfaction out of anything anymore.<br>
    
    <INPUT TYPE=radio NAME=radio4  VALUE="3">I am dissatisfied or bored with everything.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>5. Do you feel guilty about things you have or haven't done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio5  VALUE="0" checked><FONT FACE=ARIAL>I don't feel particularly guilty<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="1"> I feel guilty a good part of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="2">I feel quite guilty most of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="3">I feel guilty all of the time.
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>6. Do you feel like you are being punished for something?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio6  VALUE="0" checked><FONT FACE=ARIAL>I don't ever feel like I am being punished<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="1"> I feel I may be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="2">I expect to be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="3">I <u>am</u> being punished
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>7. Do you feel disappointmed with yourself ??</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio7  VALUE="0" checked><FONT FACE=ARIAL>I never feel disappointmed with myself ?<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="1">I seldom feel disappointed in myself<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="2">I am disgusted with myself.<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="3">I hate myself
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>8. Do you feel like you are inferior to other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio8  VALUE="0" checked><FONT FACE=ARIAL>I don't feel I am any worse than anybody else<br>
    
    <INPUT TYPE=radio NAME=radio8  VALUE="1"> I am critical of myself for my weaknesses or mistakes.<br>
    <INPUT TYPE=radio NAME=radio8  VALUE="2">I blame myself all the time for my faults.<br>
    <INPUT TYPE=radio     NAME=radio8  VALUE="3">I  blame myself for <u>everything</u> bad that happens. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>9. Have you ever thought of killing yourself?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio9  VALUE="0" checked><FONT FACE=ARIAL>I never have any thoughts of killing myself.<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="1"> I have thought of killing myself but I would <u>never</u> do it.<br>
    
    <INPUT TYPE=radio NAME=radio9  VALUE="2">I would like to kill myself<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="3">I  <u>would</u> kill myself if I had the chance
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>10. Do you find yourself crying a lot for no real reason?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio10  VALUE="0" checked><FONT FACE=ARIAL>I don't cry any more than usual.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="1"> I cry more now than I used to.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="2">I cry all the time now.<br>
    
    <INPUT TYPE=radio NAME=radio10  VALUE="3">I used to be able to cry, but now I can't cry even though I want to.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>11. Do you find yourself often feeling irritated or annoyed?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio11  VALUE="0" checked><FONT FACE=ARIAL>I am no more irritated by things than I ever was.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="1">I am slightly more irritated now than usual.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="2"> I am quite annoyed or irritated a good deal of the time.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="3">I feel irritated all the time.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>12. Have you lost interest in other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio12  VALUE="0" checked><FONT FACE=ARIAL>No, I'm still interested inother people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="1">  I am less interested than I used to be.<br>
    <INPUT TYPE=radio NAME=radio12 VALUE="2"> I have lost a lot of interest in other people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="3">I have lost <u>all</u>interest in other people.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>13. Do you find you have difficulty making decisions?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio13  VALUE="0" checked><FONT FACE=ARIAL>I make descisions as well as I ever have.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="1">  I put off making decisions more than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="2"> I have greater difficulty making decisions than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="3">I can't make decisions at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>14. Do you think you look worse physically than you should?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio14  VALUE="0" checked><FONT FACE=ARIAL>I don't think I look any worse than I used to.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="1">  I am worried that I am looking old and/or unattractive.<br>
    
    <INPUT TYPE=radio NAME=radio14  VALUE="2"> I think I have become physically unattractive and can't reverse it.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="3">I think I an ugly.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>15. Do you problems getting to work or getting your work done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio15  VALUE="0" checked><FONT FACE=ARIAL>I work as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="1">I have to make an extra effort to get started doing something.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="2"> I have to push myself very hard to get anything done.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="3">I can't get <u>any</u> work done.
    
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>16. Do you difficulties sleeping?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio16  VALUE="0" checked><FONT FACE=ARIAL>I sleep as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="1">I don't sleep as well as I used to.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="2">I wake up 1-2 hours early and find it hard to get back to sleep.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="3">I can only sleep a couple of hours a night... if at all. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>17. Do you find yourself getting tired more often or easily?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio17  VALUE="0" checked><FONT FACE=ARIAL>I don't get tired anymore than usual.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="1">I get tired more easily than I used to.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="2"> I get tired from doing almost <u>anything</u>.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="3">I am <u>too</u> tired to get anything done.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>18. Have you lost your appetite for food?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio18  VALUE="0" checked><FONT FACE=ARIAL>My appetite is the same as usual.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="1">My appetite is not as good as it used to be.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="2"> I am seldom hungry.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="3">I have no appetite at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>19. Have you been unintentionally losing weight recently ?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio19  VALUE="0" checked><FONT FACE=ARIAL>I haven't lost much weight, if any.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="1">I have lost more than 5 pounds.<br>
    
    <INPUT TYPE=radio NAME=radio19  VALUE="2"> I have lost more than 10 pounds.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="3">I have lost more than 15 pounds.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>20. Do you difficulties sleeping?</FONT><p>
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio20  VALUE="0" checked><FONT FACE=ARIAL>My health is fine.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="1">I am worried about physical problems like aches and pains and/or digestive problems.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="2"> I have a hard time thinking of anything but my health problems.<br>
    <INPUT TYPE=radio NAME=radio20 VALUE="3">I am so worried about my health that I can't think of anything else. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>21. Are you less interested in sexual activity than usual?</FONT><p>
    
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio21  VALUE="0" checked><FONT FACE=ARIAL>I haven't noticed any recent change in my interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="1">I am less interested in sex than I used to be.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="2">I have almost no interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="3">I have lost all interest in sex completely. </TD></TR></TABLE><br>     <br>
    <INPUT TYPE=button value="Result" onClick='resultat()'>
    <INPUT TYPE=reset value="Reset">
    </FORM>
    <br><BR>
    <font size="-1"><i>FROM: Beck, A.T., Ward, C. H., Mendelson, M., Mock, J., & Erbaugh, J. <br>(1961) An inventory for measuring depression. Archives of General Psychiatry 4, 561-571.</i></font><BR>
    
    </center>
    <div id="Message" style="position:absolute;z-Index:2;visibility:hidden;left:0px;top:0px;background-Color:#ffffff;" >
    <CENTER>
    <TABLE ALIGN=CENTER BGCOLOR=#7281a3 CELLSPACING=20 WIDTH=350>
    <TD ALIGN=CENTER>
    <font size=3 color=white face=arial>Your score  :<span>&nbsp;</span><BR>
    <font size=6 color=white>
    <font size=3 color=white><span>&nbsp;</span></font>
    </center>
    </font>
    </center>
    </TD>
    </TABLE>
    <center>
    <BR><BR>
    <FONT FACE=arial><A HREF=dast.html class=LgLink
    onclick="resultat(true); return false; " >Take the test again</A></font>
    </div>
    
    
    </BODY>
    
    </HTML>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #8
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Another problem

    Vik...

    I feel like I'm being a HUGE nuisance with this dumb script... but I hope it will all be for a good cause eventually. Anyway... I tried your script and now that there is no less than< as well as greater then > the only message that is delivered is the first one regardless of the actual score.

    I tried replace your code with the old code....

    if ((zxcresul>10)&& (resul < 17)){

    but that didn't get it either.

    Anyway... as always... any suggestion is appreciated.

  • #9
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    was having a bad day(again)
    Code:
    <HTML><HEAD><title>Depression Inventory</title><meta name="description" content="This online test can help you evaluate a possible depression problem "><meta name="keywords" content="Change your Mind, chemical dependency, alcohol abuse, alcohol abuse prevention, drug abuse, drug abuse prevention, chemical addiction, residential chemical dependency, outpatient chemical dependency, drug treatment, alcohol treatment, drug addiction, alcohol addiction, alcoholic, alcoholics anonymous, depression, anxiety, bi-polar disorder, ADD, ADHD, mental health testing">
    <link REL="StyleSheet" TYPE="text/css" HREF="style.css">
    <script language="JavaScript">
    <!--
    function resultat(reset){
     var zxcmessage=document.getElementById('Message');
     zxcmessage.style.visibility='hidden';
     var zxcresul=0;
     for (var zxc0=1;zxc0<22;zxc0++){
      var zxcrads=document.fom['radio'+zxc0];
      if (reset){
       zxcrads[0].checked='checked';
      }
      else {
       for (var zxc0a=0;zxc0a<zxcrads.length;zxc0a++){
        if (zxcrads[zxc0a].checked){
         zxcresul+=zxcrads[zxc0a].value*1;
        }
       }
      }
     }
     if (reset){ return; }
     var zxcmess='These emotional ups and downs are most likely normal';
     if (zxcresul>40){
      zxcmess='You are suffering from extreme depression and should talk to a health professional immediately. You may feel that this is too hard to do, or would not help if you did but that is the depression and the reason you should get it done. Call a family member or close friend to help you if you need to but get help as soon as possible. ';
     }
     else if (zxcresul>30){
      zxcmess='You are suffering from severe depression and if left untreated it could possibly lead to serious medical as well as emotional problems. You could definitely benefit by seeking professional help and support';
     }
     else if (zxcresul>20){
      zxcmess='You are suffering from moderate depression and if you have NOT recently had a serious negative life experience that could be the cause you would probably benefit from seeking professional help';
     }
     else if (zxcresul>16){
      zxcmess='You are on the borderline between mild, possibly situational depression and clinical depression. If you find youself in this state persistently you would possibly benefit from seeking professional help';
     }
     else if (zxcresul>10){
      zxcmess='You appear to be suffering from a mild mood disturbance. Give yourself a treat, take a walk or talk to a friend. Try to change your thought patterns.';
     }
     var zxcspans=zxcmessage.getElementsByTagName('SPAN')
     zxcspans[0].innerHTML=zxcresul;
     zxcspans[1].innerHTML=zxcmess;
     zxcmessage.style.width=zxcBdyWH()[0]+'px';
     zxcmessage.style.height=zxcBdyWH()[1]+'px';
     zxcmessage.style.visibility='visible';
     window.scroll(0,0);
    
    
            }
    
    //-->
    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    
    function zxcBdyWH(){
    if (document.body.scrollHeight>document.body.offsetHeight){ return [document.body.scrollWidth,document.body.scrollHeight]; }
     return [document.body.offsetWidth,document.body.offsetHeight];
    }
    
    
    
    //-->
    </script></HEAD>
    <BODY BGCOLOR=#ffffff LEFTMARGIN="0">
    
    <CENTER><br>
    <TABLE WIDTH=60% BGCOLOR=#7281a3 ALIGN=CENTER><TD ALIGN=CENTER>
    <font size="5" color="#ffffff" face="verdana, rial,times new roman">Depression Self Screen</font></TD></TABLE>
    <FONT FACE="arial" size="2" color="#000000">
    Answer all the following questions and then push the
     "result" <br>button at the end of the questionnaire to get your score.</FONT>
    <br><br>
    
    <FORM name=fom>
    <TABLE  WIDTH=600 ALIGN=center ><TR> <TD width=500 VALIGN=top>
    
    <FONT FACE=ARIAL SIZE=4>1. Do you ever feel sad?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio1  VALUE="0" checked>
    <FONT FACE=ARIAL>Not often<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="2">I am sad all the time and I can't snap out of it.<br>
    <INPUT TYPE=radio NAME=radio1  VALUE="3">I am so sad and unhappy that I can't stand it.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>2. Are you ever discouraged about the future?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio2  VALUE="0" checked>
    <FONT FACE=ARIAL>No<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="1">Sometimes<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="2">I feel I have nothing to look forward to.<br>
    <INPUT TYPE=radio NAME=radio2  VALUE="3">I feel the future is hopeless and that things cannot improve. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>3. Do you ever feel like a failure?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio3  VALUE="0" checked><FONT FACE=ARIAL>No<br>
    
    <INPUT TYPE=radio NAME=radio3  VALUE="1">I feel like I fail more than the average person<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="2">As I look back on my life, all I can see is a lot of failures.<br>
    <INPUT TYPE=radio NAME=radio3  VALUE="3">I feel I am a complete failure as a person.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>4. Do you usually find enjoyment and satisfaction in your life?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio4  VALUE="0" checked><FONT FACE=ARIAL>Usually I do<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="1"> I don't enjoy things the way I used to.<br>
    <INPUT TYPE=radio NAME=radio4  VALUE="2">I don't get real satisfaction out of anything anymore.<br>
    
    <INPUT TYPE=radio NAME=radio4  VALUE="3">I am dissatisfied or bored with everything.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>5. Do you feel guilty about things you have or haven't done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio5  VALUE="0" checked><FONT FACE=ARIAL>I don't feel particularly guilty<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="1"> I feel guilty a good part of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="2">I feel quite guilty most of the time.<br>
    <INPUT TYPE=radio NAME=radio5  VALUE="3">I feel guilty all of the time.
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>6. Do you feel like you are being punished for something?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio6  VALUE="0" checked><FONT FACE=ARIAL>I don't ever feel like I am being punished<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="1"> I feel I may be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="2">I expect to be punished.<br>
    <INPUT TYPE=radio NAME=radio6  VALUE="3">I <u>am</u> being punished
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>7. Do you feel disappointmed with yourself ??</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio7  VALUE="0" checked><FONT FACE=ARIAL>I never feel disappointmed with myself ?<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="1">I seldom feel disappointed in myself<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="2">I am disgusted with myself.<br>
    <INPUT TYPE=radio NAME=radio7  VALUE="3">I hate myself
    </TD></TR> <TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>8. Do you feel like you are inferior to other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio8  VALUE="0" checked><FONT FACE=ARIAL>I don't feel I am any worse than anybody else<br>
    
    <INPUT TYPE=radio NAME=radio8  VALUE="1"> I am critical of myself for my weaknesses or mistakes.<br>
    <INPUT TYPE=radio NAME=radio8  VALUE="2">I blame myself all the time for my faults.<br>
    <INPUT TYPE=radio     NAME=radio8  VALUE="3">I  blame myself for <u>everything</u> bad that happens. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>9. Have you ever thought of killing yourself?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio9  VALUE="0" checked><FONT FACE=ARIAL>I never have any thoughts of killing myself.<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="1"> I have thought of killing myself but I would <u>never</u> do it.<br>
    
    <INPUT TYPE=radio NAME=radio9  VALUE="2">I would like to kill myself<br>
    <INPUT TYPE=radio NAME=radio9  VALUE="3">I  <u>would</u> kill myself if I had the chance
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>10. Do you find yourself crying a lot for no real reason?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio10  VALUE="0" checked><FONT FACE=ARIAL>I don't cry any more than usual.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="1"> I cry more now than I used to.<br>
    <INPUT TYPE=radio NAME=radio10  VALUE="2">I cry all the time now.<br>
    
    <INPUT TYPE=radio NAME=radio10  VALUE="3">I used to be able to cry, but now I can't cry even though I want to.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>11. Do you find yourself often feeling irritated or annoyed?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio11  VALUE="0" checked><FONT FACE=ARIAL>I am no more irritated by things than I ever was.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="1">I am slightly more irritated now than usual.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="2"> I am quite annoyed or irritated a good deal of the time.<br>
    <INPUT TYPE=radio NAME=radio11  VALUE="3">I feel irritated all the time.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>12. Have you lost interest in other people?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio12  VALUE="0" checked><FONT FACE=ARIAL>No, I'm still interested inother people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="1">  I am less interested than I used to be.<br>
    <INPUT TYPE=radio NAME=radio12 VALUE="2"> I have lost a lot of interest in other people.<br>
    <INPUT TYPE=radio NAME=radio12  VALUE="3">I have lost <u>all</u>interest in other people.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>13. Do you find you have difficulty making decisions?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio13  VALUE="0" checked><FONT FACE=ARIAL>I make descisions as well as I ever have.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="1">  I put off making decisions more than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="2"> I have greater difficulty making decisions than I used to.<br>
    <INPUT TYPE=radio NAME=radio13  VALUE="3">I can't make decisions at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>14. Do you think you look worse physically than you should?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio14  VALUE="0" checked><FONT FACE=ARIAL>I don't think I look any worse than I used to.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="1">  I am worried that I am looking old and/or unattractive.<br>
    
    <INPUT TYPE=radio NAME=radio14  VALUE="2"> I think I have become physically unattractive and can't reverse it.<br>
    <INPUT TYPE=radio NAME=radio14  VALUE="3">I think I an ugly.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>15. Do you problems getting to work or getting your work done?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio15  VALUE="0" checked><FONT FACE=ARIAL>I work as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="1">I have to make an extra effort to get started doing something.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="2"> I have to push myself very hard to get anything done.<br>
    <INPUT TYPE=radio NAME=radio15  VALUE="3">I can't get <u>any</u> work done.
    
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>16. Do you difficulties sleeping?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio16  VALUE="0" checked><FONT FACE=ARIAL>I sleep as well as I always have.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="1">I don't sleep as well as I used to.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="2">I wake up 1-2 hours early and find it hard to get back to sleep.<br>
    <INPUT TYPE=radio NAME=radio16  VALUE="3">I can only sleep a couple of hours a night... if at all. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>17. Do you find yourself getting tired more often or easily?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio17  VALUE="0" checked><FONT FACE=ARIAL>I don't get tired anymore than usual.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="1">I get tired more easily than I used to.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="2"> I get tired from doing almost <u>anything</u>.<br>
    <INPUT TYPE=radio NAME=radio17  VALUE="3">I am <u>too</u> tired to get anything done.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>18. Have you lost your appetite for food?</FONT>
    
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio18  VALUE="0" checked><FONT FACE=ARIAL>My appetite is the same as usual.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="1">My appetite is not as good as it used to be.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="2"> I am seldom hungry.<br>
    <INPUT TYPE=radio NAME=radio18  VALUE="3">I have no appetite at all anymore.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>19. Have you been unintentionally losing weight recently ?</FONT>
    <p><FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio19  VALUE="0" checked><FONT FACE=ARIAL>I haven't lost much weight, if any.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="1">I have lost more than 5 pounds.<br>
    
    <INPUT TYPE=radio NAME=radio19  VALUE="2"> I have lost more than 10 pounds.<br>
    <INPUT TYPE=radio NAME=radio19  VALUE="3">I have lost more than 15 pounds.
    </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>20. Do you difficulties sleeping?</FONT><p>
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio20  VALUE="0" checked><FONT FACE=ARIAL>My health is fine.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="1">I am worried about physical problems like aches and pains and/or digestive problems.<br>
    <INPUT TYPE=radio NAME=radio20  VALUE="2"> I have a hard time thinking of anything but my health problems.<br>
    <INPUT TYPE=radio NAME=radio20 VALUE="3">I am so worried about my health that I can't think of anything else. </TD></TR><TR><TD width=500 VALIGN=top><HR>
    
    <FONT FACE=ARIAL SIZE=4>21. Are you less interested in sexual activity than usual?</FONT><p>
    
    <FONT FACE=ARIAL><INPUT TYPE=radio NAME=radio21  VALUE="0" checked><FONT FACE=ARIAL>I haven't noticed any recent change in my interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="1">I am less interested in sex than I used to be.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="2">I have almost no interest in sex.<br>
    <INPUT TYPE=radio NAME=radio21  VALUE="3">I have lost all interest in sex completely. </TD></TR></TABLE><br>     <br>
    <INPUT TYPE=button value="Result" onClick='resultat()'>
    <INPUT TYPE=reset value="Reset">
    </FORM>
    <br><BR>
    <font size="-1"><i>FROM: Beck, A.T., Ward, C. H., Mendelson, M., Mock, J., & Erbaugh, J. <br>(1961) An inventory for measuring depression. Archives of General Psychiatry 4, 561-571.</i></font><BR>
    
    </center>
    <div id="Message" style="position:absolute;z-Index:2;visibility:hidden;left:0px;top:0px;background-Color:#ffffff;" >
    <CENTER>
    <TABLE ALIGN=CENTER BGCOLOR=#7281a3 CELLSPACING=20 WIDTH=350>
    <TD ALIGN=CENTER>
    <font size=3 color=white face=arial>Your score  :<span>&nbsp;</span><BR>
    <font size=6 color=white>
    <font size=3 color=white><span>&nbsp;</span></font>
    </center>
    </font>
    </center>
    </TD>
    </TABLE>
    <center>
    <BR><BR>
    <FONT FACE=arial><A HREF=dast.html class=LgLink
    onclick="resultat(true); return false; " >Take the test again</A></font>
    </div>
    
    
    </BODY>
    
    </HTML>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #10
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Roseburg, Oregon
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hooray !

    Vik...

    Thanks for sticking with it... despite your bad day

    It works like a chanp now and I can use the template to do the other test forms. I hope it's okay to give you credit for the hel and a link at the site.

    Thanks for all the work..

    Pablo


  •  

    Posting Permissions

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