开发者

A lot of loop errors when using form's radio

Hello guys i have a problem while trying to use the 'radio' input in a form - every time i put my mouse on one of the radio buttons i get like 400 errors saying

Empty string passed to getElementById(). @ ...cApp.php
开发者_Go百科

I have no idea if its somehow related to the jQuery code i tried to use because even when i delete all the jQuery code the errors are coming out!

here is the code:

<form method="post" action="" id="cApp" autocomplete="off" />
  <div class="appTargetLabel">
  Target:
  <label for=""><input type="radio" name="clientCheck" value="self" checked="checked" /> Self</label>
  <label for=""><input type="radio" name="clientCheck" value="client" /> Client</label>
  </div>

Again - even when i completely remove all the jquery code i still get these errors.


It looks like there is a problem with getElementById() and missing IDs. I don't know where this error messages is shown, but I would try to use IDs and connect the labels to them:

<form method="post" action="" id="cApp" autocomplete="off" />
  <div class="appTargetLabel">
  Target:
  <label for="i1"><input id="i1" type="radio" name="clientCheck" value="self" checked="checked" /> Self</label>
  <label for="i2"><input id="i2" type="radio" name="clientCheck" value="client" /> Client</label>
  </div>
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜