2011-09-03 29 views
0

大家好我在嘗試在窗體中使用「收音機」輸入時出現問題 - 每當我將鼠標放在其中一個單選按鈕上時,我會收到400條錯誤,說使用窗體收音機時出現很多循環錯誤

Empty string passed to getElementById(). @ ...cApp.php 

我不知道,如果它的主題相關的jQuery代碼我想,因爲即使當我刪除所有的jQuery代碼中的錯誤都出來用!

這裏是代碼:

<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> 

再次 - 甚至當我完全刪除所有jQuery代碼我仍然得到這些錯誤。

+0

你的代碼是不完整的,顯示的JavaScript你有充分的頁面,包括所有它。 –

+0

是給出的錯誤的行號? –

+0

@Davide Piras - 我說即使當我徹底刪除所有的JavaScript它仍然顯示我的錯誤,也許它與緩存有關? ŠimeVidas - Nope。 – Ricardo

回答

1

它看起來像getElementById()和缺少ID的問題。我不知道在哪裏顯示該錯誤消息,但我會嘗試使用ID和標籤連接到它們:

<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

非常感謝你的朋友! – Ricardo