Welcome to Prairie School District

The key to your success starts here

Here at Prairie School District (PSD) we are committed to helping you succeed. PSD strives to do everything in our power to give you the tools you need to accomplish your goals. Please find the upcoming homework assignments table below for your reference. See the Homework page for full details.

Class Homework Assignment
IMD2151 Individual Project (Unit 1)
Discusussion Board (Unit 1)
Live Chat (Unit 1)
CGR1251 Group Project (Unit 1)
Discusussion Board (Unit 1)
WDN1331 Individual Project (Unit 1)
Live Chat (Unit 1)

Javascript Tip of the Week

This week's Javascript Tip of the Week is an example of how to create a daily message like the one you see at the top of this page showing the current date.

The "writeMsgOfDay()" Javascript function is seen below. Follow the commented lines that start with // to see what the function is doing.

   1  function writeMsgOfDay(){
   2    // Writes the secondary header on the page with a unique message of the day
   3    
   4    // Create date variables for today
   5    var today = new Date();
   6    var day = today.getDay();
   7    var month = today.getMonth();
   8    var date = today.getDate();
   9    var year = today.getYear();
  10    var hour = today.getHours();  11  
  12    // Create array of weekdays
  13    var weekday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  14  
  15    // Create array of month names
  16    var monthName = new Array("January","February","March","April","May","June","July","August",
  17                              "September","October","November","December");  18  
  19    // Check time to see if it's morning, afternoon or evening and create appropriate message
  20    var sGreeting;
  21    if(hour < 4)
  22      sGreeting = "Hello, night owl. ";
  23    else if(hour < 12)
  24      sGreeting = "Good morning. ";
  25    else if(hour < 17)
  26      sGreeting = "Good afternoon. ";
  27    else if(hour <= 24)
  28      sGreeting = "Good evening. ";  29  
  30    // Compile message of the day using date components previously created
  31    var sMsg = "<h2>" + sGreeting + "Today is " + weekday[day] + ", " + monthName[month] + " " + 
  32                date + ", " + year + ".</h2>";  33
  34    // Write the message on the page
  35    document.write(sMsg);  36  }