The following code is online test where I fetch data from test.jsp page. Now when user clicks a radio button and click on next it stores the value of the radio button and shows next value of the radio button. Here radio buttons are working properly but I am not able to store the value of each radio button clicked.

```
  <script>
        $(document).ready(function(){
             $("#treck").click(function(event){
                 var value = $("#users").val();
                 var idr=$("#wr").val();         
                 var whl=value+" "+"d"+idr;
                 $.get("test.jsp",{q:whl},function(data){
                    $("#javaquery").html(data);
                 });
             });
         });
  </script>

```

this above code of passing the value of hidden field to test.jsp so as to bring the value.

JSP code

```
try {
        Class.forName("oracle.jdbc.OracleDriver").newInstance();
        Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","manager");
        Statement smt = con.createStatement(); //Create Statement to interact
        ResultSet r = smt.executeQuery("select * from synonyms where srno="+ind+"");

        while(r.next()) {
          y=r.getString(1);
          ques=r.getString(2);
          opta = r.getString(3);
          optb = r.getString(4);
          optc = r.getString(5);
          optd = r.getString(6);
        }

        con.close();
   } catch (Exception e) {
        e.printStackTrace();

   }

     %>

    <input type="radio" name="opt" id="r1"  /><%=opta%>
    <input type="radio" name="opt" id="r2"  /><%=optb%>
    <input type="radio" name="opt" id="r3" /><%=optc%>
    <input type="radio" name="opt" id="r4"  /><%=optd%>

```

Can anyone please give any hint?