0

Following is my HTML source code. If I select any of the radio buttons in human task form,the output value always returns the value of the last radio button. (here :NotClean)

<html>
    <body>
        <h2>Document varification</h2>
        <hr>
        <br/>
        <input type="radio" name="Outcome" value="Done">Done<br/>
        <input type="radio" name="Outcome" value="NotClean">NotClean<br/>
    </body>
</html>
Saagar
  • 794
  • 3
  • 20
  • 41

1 Answers1

0
 <html>
    <head>
        <title>sample Page</title>
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>

    <script>

        $(document).ready(function () {


            $('button').click(function () {
                var Outcome;

                Outcome = $('input[name="Outcome"]:checked').val();


                if (Outcome == "Done") {
                    alert('condition1')
                }
                else if (Outcome == "NotClean") {

                    alert('condition2')
                    }

            })

        });


    </script>
    </head>
    <body>
        <button >check Condition</button>
       <input type="radio" name="Outcome" value="Done" >Done<br/>
<input type="radio" name="Outcome" value="NotClean">NotClean<br/>
    </body>
    </html>
Jobelle
  • 2,717
  • 1
  • 15
  • 26