JavaScript and changing form attributes (colors)

     Good Morning,
     
     The following script run onload() in the BODY statement.
     I want the script to change colors/background based on the time.
     
     Problems I'm having...
     
     1. getMinutes is not defined - How can I set a variable minutes ?
     2. setting bgcolor works when I change the variable manually,
         but how do you change the text color ?
     
     <SCRIPT LANGUAGE="JavaScript">
     function bkcolor()
     {       var now = Date();
             var minutes = getMinutes(); <--- receives error
             minutes = getMinutes();     <--- receives error
             var minutes = 22;           <--- works
     
        if (minutes > 30)        
                {document.fgColor='white'};
        if (minutes > 30)        
                {document.bgColor='darkgreen'} ;
     
     
     
     thanks, fred

Received on Monday, 3 February 1997 10:01:41 UTC