 |
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

February 2nd, 2018, 06:22 PM
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
|
|
checkboxes show undefined value
For some reason this isn't working. Both
checked=true
and
checked==true
don't work.
Code:
//twotexts.js
function strongsCheck(){
var KeyWord = "&keyword=";
var chkStrongsBox = document.getElementsByClassName("checkbox-inline");
for(i=0;i<chkStrongsBox.length;i++){
if(chkStrongsBox[i].checked=true){
if(i<(chkStrongsBox.length-1)){
KeyWord += +chkStrongsBox[i].value+"|";
}else{
KeyWord += +chkStrongsBox[i].value;
}
}
}
alert(KeyWord);
}
PHP Code:
<div id="strongs_list"> <label class="checkbox-inline-all" style="display: block;"><input id="id_all" onclick="if(this.checked){highlightThemAll(); highlightThem()}else{unhighlightThemAll(); unhighlightThem()};" style="border: 1px solid #FFFFFF;" value="all" type="checkbox">all Strongs' in Common</label><br> <label class="checkbox-inline" style="width: 80px; height: 40px; display: block; font-weight: bold; color: red" title=" results: (' of their |fathers|,', ' unto your |fathers|;', ' unto their |fathers|:', ' of their |fathers|,', ' which their |fathers|', ' <em>themselves</em> more than their |fathers|,', ' their |fathers|,', ' therein, as their |fathers|') occuring 8 times as: (''ab', ''ab', ''ab', ''ab', ''ab', ''ab', ''ab', ''ab') - original language:('ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ', 'ÃÂøÃâ') - description: ('a root', 'a root', 'a root', 'a root', 'a root', 'a root', 'a root', 'a root') related to: () also look at: "> <input id="id_0" class="class_strongs" value="H1" onclick="strongsCheck(); if(this.checked){highlightThem1(); highlightThem2();}else{unhighlightThem();};" style="border: 1px solid #FFFFFF;" type="checkbox">[H1]</label><br> <label class="checkbox-inline" style="width: 80px; height: 40px; display: block; font-weight: bold; color: red" title=" results: occuring times as: - original language: - description: related to: () also look at: "> <input id="id_0" class="class_strongs" value="H4519" onclick="strongsCheck(); if(this.checked){highlightThem1(); highlightThem2();}else{unhighlightThem();};" style="border: 1px solid #FFFFFF;" type="checkbox">[H4519]</label><br> <label class="checkbox-inline" style="width: 80px; height: 40px; display: block; font-weight: bold; color: red" title=" results: occuring times as: - original language: - description: related to: () also look at: "> <input id="id_0" class="class_strongs" value="H27" onclick="strongsCheck(); if(this.checked){highlightThem1(); highlightThem2();}else{unhighlightThem();};" style="border: 1px solid #FFFFFF;" type="checkbox">[H27]</label><br> <label class="checkbox-inline" style="width: 80px; height: 40px; display: block; font-weight: bold; color: blue" title=" results: (' |after|', ' |*|', ' |after|', ' |*|', ' |after|', ' |*|') occuring 6 times as: (''achar', ''achar', ''achar', ''achar', ''achar', ''achar') - original language:('ÃÂ÷Ãâ֏', 'ÃÂ÷Ãâ֏', 'ÃÂ÷Ãâ֏', 'ÃÂ÷Ãâ֏', 'ÃÂ÷Ãâ֏', 'ÃÂ÷Ãâ֏') - description: ('from ÃÂøÃâ֏ (H309)', 'from ÃÂøÃâ֏ (H309)', 'from ÃÂøÃâ֏ (H309)', 'from ÃÂøÃâ֏ (H309)', 'from ÃÂøÃâ֏ (H309)', 'from ÃÂøÃâ֏ (H309)') related to: H309('achar) also look at: "> <input id="id_1" class="class_strongs" value="H310" onclick="strongsCheck(); if(this.checked){highlightThem1(); highlightThem2();}else{unhighlightThem();};" style="border: 1px solid #FFFFFF;" type="checkbox">[H310]</label><br> <label class="checkbox-inline" style="width: 80px; height: 40px; display: block; font-weight: bold; color: blue" title=" results: occuring times as: 'achar - original language: - description: related to: () also look at: "> </div>
|
|
 |