我正在尝试上传单选按钮到mysql,我正在使用jquery插件星级评级,没有运气

时间:2013-07-22 21:47:12

标签: javascript jquery mysql

我无法将单选按钮上传到mysql以查看它们是否被选中,我使用的是一个名为:star rating并且没有运气的jquery插件。我还需要在页面刷新时保留星标。

<script language="javascript">
$(document).ready(function(e) {
    $(".check").bind('click', function(){
        var box_id= $(this).attr("id").split("_")[$(this).attr("id").split("_").length-1];
        //console.log($(this).prop("checked") + " " + $(this).val());
        writeListValue(10,box_id,$(this).prop("checked"));
    });
    });
</script>
<form name="strategies" action="" onsubmit="return verifyIt();" method="post">
    <input type="hidden" id="from" name="from" value="strategies" />
    <input type="hidden" id="direction" name="direction" value="" />

    <table  width="100%" style="margin-left:25px" >
     <tr>
        <td><input name="star1" class="star check" id="star1" type="radio" value="" />
        <input name="star1" class="star" id="star1" type="radio" value="" />
        <input name="star1" class="star" id="star1" type="radio" value="" />
        <input name="star1" class="star" id="star1" type="radio" value="" />
        <input name="star1" class="star" id="star1" type="radio" value="" /></td>
        <td><label for="star1">Catch myself before spiraling downward</label></td>
        </tr>
      <tr>
        <td><input name="star2" class="star" id="star2" type="radio" value=""  />
        <input name="star2" class="star" id="star2" type="radio" value="" />
        <input name="star2" class="star" id="star2" type="radio" value="" />
        <input name="star2" class="star" id="star2" type="radio" value="" />
        <input name="star2" class="star" id="star2" type="radio" value="" /></td>
        <td><label for="star2">Accepting who I am and my body shape</label></td>
        </tr>
      <tr>
        <td><input name="star3" class="star" id="star3" type="radio" value="" />
        <input name="star3" class="star" id="star3" type="radio" value="" />
        <input name="star3" class="star" id="star3" type="radio" value="" />
        <input name="star3" class="star" id="star3" type="radio" value="" />
        <input name="star3" class="star" id="star3" type="radio" value="" /></td>
        <td><label for="star3">Doing pleasant activities</label></td>
        </tr>
      <tr>
        <td><input name="star4" class="star" id="star4" type="radio" value="" />
        <input name="star4" class="star" id="star4" type="radio" value="" />
        <input name="star4" class="star" id="star4" type="radio" value="" />
        <input name="star4" class="star" id="star4" type="radio" value="" />
        <input name="star4" class="star" id="star4" type="radio" value="" /></td>
        <td><label for="star4">Remember my reasons for staying quit</label></td>
        </tr>
      <tr>
        <td><input name="star5" class="star" id="star5" type="radio" value="" />
        <input name="star5" class="star" id="star5" type="radio" value="" />
        <input name="star5" class="star" id="star5" type="radio" value="" />
        <input name="star5" class="star" id="star5" type="radio" value="" />
        <input name="star5" class="star" id="star5" type="radio" value="" /></td>
        <td><label for="star5">Not overreacting to my extreme thoughts</label></td>
        </tr>
      <tr>
        <td><input name="star6" class="star" id="star6" type="radio" value="" />
        <input name="star6" class="star" id="star6" type="radio" value="" />
        <input name="star6" class="star" id="star6" type="radio" value="" />
        <input name="star6" class="star" id="star6" type="radio" value="" />
        <input name="star6" class="star" id="star6" type="radio" value="" /></td>
        <td><label for="star6">Using relaxation exercises</label></td>
        </tr>
      </table></form> 
      <jsp:include page="/data/loadRadioButton.jsp" flush="true">
<jsp:param name="list_name" value="star_"></jsp:param>
<jsp:param name="list_id" value="10"></jsp:param>
</jsp:include>       
      </div>
  </div></div>

0 个答案:

没有答案