Blog Demos
Multi Date Select| Google Geocoding| Rexexp Searching| Hierarchical Control| Pipelined Function| Enhanced Shuttle|
Calendar 1    
February 2010
Sunday Monday Tuesday WednesdayThursday Friday Saturday
31
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
01
02
03
04
05
06
Back To The Blog    
http://christopherbeck.wordpress.com/2008/07/29/multiple-date-selector/
Select List    
Source Code    
PAGE JAVASCRIPT
<script>  
var selectedColor = '#CC3333';  
   
function addToSelectList( pList, pDisplay, pValue )  
{  
  var s = document.getElementById( pList );  
  s.length++;  
  s.options[s.length-1].text = pDisplay;  
  s.options[s.length-1].value = pValue;  
}  
   
function removeFromSelectList( pList, pValue )  
{  
  var s = document.getElementById( pList );  
  for ( i=0; i<s.length; i++ )  
  {  
    if ( s.options[i].value == pValue )  
    {  
      s.remove(i);  
      return;  
    }  
  }  
}  
  
function toggleEvent( pCell, pList, pDisplay, pValue )  
{  
  var cell = document.getElementById( pCell );  
  if ( cell.style.backgroundColor == "" )  
  {  
    addToSelectList( pList, pDisplay, pValue );  
    cell.style.backgroundColor = selectedColor;  
  }  
  else  
  {  
    removeFromSelectList( pList, pValue );  
    cell.style.backgroundColor = null;  
  }  
}  
</script>
DAY LINK URL
javascript:toggleEvent( 'CELL#YYYY##MM##DD#', 
                        'P2_DATES', 
                        '#IDAY#, #IMONTH# #IDDTH# #YYYY#', 
                        '#DD#-#MON#-#YYYY#' )

nobody
en-us