[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What's wrong with this?
In the following code, the statement
    iz = str.length - lit.length;
*seems* to set "iz" to 0, rather than the correct value, which is 47 (65 - 18).
Alert #1 displays the values 0, 65, 18 for iz, str.length, and lit.length,
respectively.  
What am I doing wrong?
Using NS 2.0b5 on PowerMac, Sys 7.5.1.
Bill
===========================
  var whattext;
  function displayPrecis(which) {
    var str       = "" + top.frames["aux1"].location,
        lit       = "precis-callee.html";
    var iz;
    iz = str.length - lit.length; 
#1  alert("Here : " + (" " + iz) + " " + str.length + " " +  lit.length);
#2  alert("<" + str.substring(iz, str.length) + ">" ); 
    return true;
  }