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>
精彩评论