CIS 757 WEB DESIGN QUIZ -02a

Prof. Auciello's Virtual Classroom Quiz

Last.First Name:

 

Q001: CIS 757 QUIZ 02 PROF. AUCIELLO This is the famous Scrolling Banner Program that makes use of the HTML Style Command to set font characteristics. Here is the entire JavaScript program for reference. (You may also clip and paste this to make it run!) <!-- CIS 757 /790 BY: ROBERT JOHNSTON KEY IN, TEST, AND CUSTOMIZE THE FOLLOWING PROGRAM: OBJECTIVE: LEARN HOW TO FIX ERRORS IN JAVASCRIPT. (200) SKILLS : PROGRAMING TESTING UNDERSTAND EVERY LINE. COMMENT EVERY LINE KEY IN THE FOLLOWING PROGRAM: <HTML> <HEAD> <TITLE> Creating a Scrolling banner</TITLE> <PRE> CIS 757 JAVASCRIPT BY: ROBERT JOHNSTON </PRE> <SCRIPT LANGUAGE="JavaScript"> var BannerString=" GO USA! WE LOVE OUR COUNTRY! ... "; var timer =00; // changed timer value from 0 to 100 function Scrollfunction() // begins { document.textform.textbox.value= BannerString; // displays banner. BannerString= BannerString.substring (1,BannerString.length) + BannerString.charAt(0) // reconstitute string. //decrease timeout value to speed up, increase to slow down timer= setTimeout("Scrollfunction() ",150) } </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE ONLOAD= Scrollfunction()><CENTER> <FORM NAME= "textform" onSubmit= "0"> <CENTER><INPUT TYPE="text" NAME= "textbox" SIZE="65" STYLE="font-size: 36pt; color: red; font-family: Arial, Helvetica, sans-serif; background-color: blue;" > </CENTER> </BODY> </HTML> </PRE> --> QUESTION #1: EXPLAIN THE FOLLOWING LINES COMPLETELY. YOUR ANSWER MUST BE AT LEAST 2 SENTENCES. <SCRIPT LANGUAGE="JavaScript"> var BannerString=" GO USA! WE LOVE OUR COUNTRY! ... "; var timer =00; Explain each element (What is in quotes is an element.) Explain each word!

 

Q002: function Scrollfunction() // begins { document.textform.textbox.value= BannerString; // displays banner. BannerString= BannerString.substring (1,BannerString.length) + BannerString.charAt(0) // reconstitute string. //decrease timeout value to speed up, increase to slow down timer= setTimeout("Scrollfunction() ",150) } Explain every line. Start off with "Scrollfunction" is the name of a method or function (like a sub-routine) .. the () "null parantheses" indicate that no values are being passed. Read more about this .. This is a hard assignment. Research it carefully. http://www.beginnersjavascript.co.uk/practical/textscroll.html

 

Q003: <pre> <BODY BGCOLOR=WHITE ONLOAD= Scrollfunction()><CENTER> <FORM NAME= "textform" onSubmit= "0"> <CENTER><INPUT TYPE="text" NAME= "textbox" SIZE="65" STYLE="font-size: 36pt; color: red; font-family: Arial, Helvetica, sans-serif; background-color: blue;" > </CENTER> </BODY> EXPLAIN EVERY WORD. NOTE THAT STYLE LISTS ITS PARAMETERS IN QUOTES, AND THAT THEY ARE reserved words like font-size, color, etc. Find some other font-family types, and show me the hex code (this is hard) to show cyan font on pink background! I am interested to see who the first one to do this is!

 

Q004: This is a hard question (for me) to ask: At what point must a web designer turn on his / her "artistic" stuff? How far can you go with just the technology if you cant balance colors, blend motifs (themes), and generally understand the principles of visual communication? I want some deep, soul-searching, gut-wrenching "smack" here! This is a profound question that every "tech" person has to deal with, so give it attention!