[thelist] Toggle disable/enable of text box

Aylard JA (James) jaylard at equilon.com
Thu Jan 18 12:04:39 CST 2001


> In JavaScript, *all* data types are strings.  So, an unquoted true,
because
> it is a keyword, is the same is a quoted true, so (true=='true') is true.

	Huh? Use the typeof operator, and you'll see that this isn't so:

<script language="javascript" type="text/javascript">
  <!--
    var strTrue, strFalse, blnTrue, blnFalse ;
    strTrue = "true" ;
    strFalse = "false" ;
    blnTrue = true ;
    blnFalse = false ;
    alert("strTrue is a " + typeof(strTrue) +
      "\nstrFalse is a " + typeof(strFalse) +
      "\nblnTrue is a " + typeof(blnTrue) +
      "\nblnFalse is a " + typeof(blnFalse)) ;
  // -->
</script>

James Aylard




More information about the thelist mailing list