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#' )
|