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
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools 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: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
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
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 11:13 PM
undefined Adam H-W Javascript 5 September 26th, 2007 02: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 11:18 AM.


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