[Javascript] IE work-a-round question (re: checkboxes)

Claude Schneegans schneegans at internetique.com
Sat Apr 12 10:34:40 CDT 2008


 >>In this case, it worked for breaking a
string into its characters.

But what's the big idea of breaking a string into its character in order 
to make a string with them?
Especially if those characters are "1" and "1"
If id[2] and id[3] are "1"s, the expression might very well end into "2" 
(addition) instead of "11" (concatenation).
If you need to extract chars 2 and 3 out of the string id, better use 
the substr() method:
id2 = "c" + id.substr(2,2);

-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: piegeacon at internetique.com)
Thanks.




More information about the Javascript mailing list