JDev

dom, javascriptAugust 18, 2006 5:38 pm

The algorithm to hide a particular column in a HTML table will be as follows: get a reference to table rows, then cycle through each row, get a reference to a cell belonging to that particular column, and set its style to none: mycell.style.display="none";

More on this and an example is at this page.

javascript 2:07 pm

    Here is an object literal version of a script to calculate JavaScript execution time. It may be useful in development to compare the performance of different scripts. The advantage of the object literal version is that it is compact and should not interfere with existing script function names.

 var timeDiff  =  {
    setStartTime:function (){
        d = new Date();
        time  = d.getTime();
    },

    getDiff:function (){
        d = new Date();
        return (d.getTime()-time);
    }
}

Use it as follows: call timeDiff.setStartTime() at the start of your script and call timeDiff.getDiff() at the end. The timeDiff.getDiff() function will return the script execution time.

Visit  http://www.ekcsoft.com/coding/js/  for more JavaScript tips.

Code, javascript 1:58 pm

By default, you can’t use JavaScript to write to the status bar in Firefox. To change the Firefox default behavior in version 1.5, go to “Tools → Options → Content → Enable JavaScript / Advanced"  and check the "Change status bar text” option.

http://blog.taragana.com/index.php/archive/how-to-enable-windowstatus-in-firefox/