Changeset 3420 for TI05-delivery


Ignore:
Timestamp:
14/02/08 14:10:40 (12 years ago)
Author:
cbyrom
Message:

Add new javascript function, selectAll, to allow the use of a 'select all'
type checkbox in a table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/js/ndgJavascript.js

    r2688 r3420  
    7575} 
    7676  
     77// Set all checkboxes in a table to be the same state as the checkbox passed in  
     78function selectAll(abox, tableID)  
     79{ 
     80        var table = document.getElementById(tableID); 
     81    var cboxes = table.getElementsByTagName('input'); 
     82        var l = cboxes.length; 
     83 
     84        for (var i = 0; i < l; i++) 
     85        { 
     86        var n = cboxes[i]; 
     87                var tst = typeof n; 
     88        if ('checkbox' == n.type && n != abox) 
     89        { 
     90                        n.checked = abox.checked; 
     91        } 
     92    } 
     93} 
     94  
Note: See TracChangeset for help on using the changeset viewer.