Click here to Skip to main content
15,884,062 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: JQuery Validator, rules highlight creates label under textbox that is wrong class. [solved] Pin
jkirkerx22-Jun-16 12:34
professionaljkirkerx22-Jun-16 12:34 
GeneralMultidimensional Array in JavaScript Pin
HubSnippets22-Jun-16 2:05
HubSnippets22-Jun-16 2:05 
AnswerRe: Ajax succees event not firing with jsonp Pin
Peter_in_278021-Jun-16 17:23
professionalPeter_in_278021-Jun-16 17:23 
QuestionJquery Row details open Pin
Member 1130579120-Jun-16 3:31
Member 1130579120-Jun-16 3:31 
QuestionHow to compute XOR logic? Pin
AmalRaj@Sync19-Jun-16 19:05
AmalRaj@Sync19-Jun-16 19:05 
AnswerRe: How to compute XOR logic? Pin
Richard MacCutchan19-Jun-16 21:41
mveRichard MacCutchan19-Jun-16 21:41 
AnswerRe: How to compute XOR logic? Pin
Kornfeld Eliyahu Peter19-Jun-16 23:37
professionalKornfeld Eliyahu Peter19-Jun-16 23:37 
AnswerRe: How to compute XOR logic? Pin
Richard Deeming20-Jun-16 1:50
mveRichard Deeming20-Jun-16 1:50 
Strings are not booleans or numbers. If you use:
JavaScript
var s1 = "true";
var s2 = "false";
var result = s1 ^ s2; // === 0

you will (correctly) get a result of 0. This is because the strings are "truthy" - when converted to a boolean, all non-empty strings convert to true.
Truthy and Falsy: When All is Not Equal in JavaScript[^]

If you use proper boolean values, you will get the expected result:
JavaScript
var s1 = true;
var s2 = false;
var result = s1 ^ s2; // === 1




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionLooking for tutorial or code to learn from, display only certain XML records Pin
bulrush40010-Jun-16 3:29
bulrush40010-Jun-16 3:29 
AnswerRe: Looking for tutorial or code to learn from, display only certain XML records Pin
John C Rayan14-Jun-16 4:55
professionalJohn C Rayan14-Jun-16 4:55 
Questionhow to hide web browser toolbar and show web page with fullscreen Pin
njzt3-Jun-16 5:39
njzt3-Jun-16 5:39 
AnswerRe: how to hide web browser toolbar and show web page with fullscreen Pin
Richard Deeming3-Jun-16 7:14
mveRichard Deeming3-Jun-16 7:14 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
njzt3-Jun-16 18:33
njzt3-Jun-16 18:33 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
njzt6-Jun-16 1:55
njzt6-Jun-16 1:55 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
Richard Deeming6-Jun-16 4:25
mveRichard Deeming6-Jun-16 4:25 
QuestionNeed simple "Revert To Saved" Javascript code for fillable PDF Pin
Member 125622572-Jun-16 9:00
Member 125622572-Jun-16 9:00 
SuggestionRe: Need simple "Revert To Saved" Javascript code for fillable PDF Pin
Richard MacCutchan2-Jun-16 21:43
mveRichard MacCutchan2-Jun-16 21:43 
QuestionRunning XMLHttpRequest in Firefox gives no results at all Pin
bulrush40025-May-16 8:59
bulrush40025-May-16 8:59 
AnswerRe: Running XMLHttpRequest in Firefox gives no results at all Pin
ZurdoDev25-May-16 10:25
professionalZurdoDev25-May-16 10:25 
SuggestionRe: Running XMLHttpRequest in Firefox gives no results at all Pin
Richard Deeming25-May-16 10:35
mveRichard Deeming25-May-16 10:35 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
bulrush40026-May-16 0:36
bulrush40026-May-16 0:36 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
Richard Deeming26-May-16 1:46
mveRichard Deeming26-May-16 1:46 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
bulrush40010-Jun-16 3:10
bulrush40010-Jun-16 3:10 
QuestionI am not sure why this controller is not firing in this AngularJS script, any help Pin
indian14321-May-16 4:05
indian14321-May-16 4:05 
AnswerRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
Karthik_Mahalingam21-May-16 19:49
professionalKarthik_Mahalingam21-May-16 19:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.