Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 2nd, 2018, 06:22 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default 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</emmore 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="border1px 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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Checkboxes alexpullos BOOK: Beginning PHP 5.3 1 July 31st, 2011 10:13 PM
undefined Adam H-W Javascript 5 September 26th, 2007 01:31 AM
Checkboxes undefined when not checked MS Access Morn ASP.NET 2.0 Basics 29 February 19th, 2007 04:58 PM
Checkboxes undefined when not checked MS Access Morn Classic ASP Basics 0 February 15th, 2007 05:07 PM



All times are GMT -4. The time now is 01:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.