PROGRAM STEPS IN ENGLISH:
1. start HTML
2. start Head Section
3. Create a title called "Scrolling Banner", end definition of title.
4. Begin Script Language, using JavaScript.
5. Define a string variable "BannerString" containing "This banner .."
6. Create a variable named 'timer' set to 0;
7. Define a function called "Scrollfunction()"
8. Opening brace.
9. Put the name of the string variable in 'boxtext' within 'box'
within 'document'.
10. Create a message by extracting a substring starting at the 1st
position going to then end of the string and chaining that to
the character at 0, the 1st character in the string.
11. Set time-delay of 100 milliseconds for function "Scrollfunction()".
12. Close brace.
13. End Script section of program.
14. End Head Section.
15. Begin Body Section, when the html is loaded, call function
"scrollfunction()"
16. Name the form "textform", and execute a script when form is submitted.
17. Define "textbox" with a 65 characters width.
18. End Body
19. End HTML
THIS EXERCISE HAS BEEN USED BY SEVERAL CLASSES WITH EXCELLENT
RESULTS. 'DEBUGGING' SKILLS ARE ESSENTIAL. SHOW ME WHAT
YOU CAN DO, FOR YOUR SAKE. BE AWARE THAT THERE ARE SOME
CHALLENGING ERRORS IN THE CODE BELOW.
TO IMPROVE YOUR DEBUGGING SKILLS, THE FOLLOWING CODE HAS ERRORS
IN IT. TRY TO REMOVE ERRORS BY A CAREFUL PROOF-READING, THEN
EXECUTE THE SCRIPT WITH A BROWSER (NETSCAPE OR IE). WHEN ERRORS
OCCUR, TYPE javascript: INTO THE LOCATION LINE, AND TROUBLE-SHOOT
THE CODE. MAKE THE PROGRAM WORK. JA. OUT.
IF LINES OF CONTINUE, DON'T HIT , JUST CONTINUE TO
TYPE. DONT PUT A LINE-FEED/RETURN IN THE MIDDLE OF A LINE OF CODE.
Use the following JavaScript Statements to write the program:
(100 Points)
|