Design Text, Chapter 9, pages 149 - 177 (Linking)
JavaScript Text, Chapter 1, pgs 26-46
Reading:
- Study the topics
- Absolute links
- Relative links
- Linking within the same page
- Target attribute
- The mailto link
- The mailto link is not as valuable as it once was since many users do not configure their computers to
associate with a mail program and Internet Explorer does not allow the body of a message to
send through a form using HTML and JavaScript. Most mail coding is now done through server-side scripting.
- JavaScript containing html tags
- The examples of JavaScript coding in pages 34 - 44 of the JavaScript text show the inclusion of html tags within the
string that is part of the document.write statement. Those statements will not validate using XHTML
strict.
- In order for your HTML tags to validate within your JavaScript code, you must follow the instructions shown on
pages 44 and 45 of the text.
- Using the pre tag
- The pre tag described on page 37 of the JavaScript text has other uses than the writeln method. However, it is not
recommended that you over use the pre element.
Practice:
- Linking within the page
- Visit my syllabus.
Notice the links across the top of the page that link within the page.
- View your index page. There is a link at the top of the page to the template link.
Create links across the top of your index page to link to:
- Assigment 2
- Assigment 3
- Assigment 4
- Assigment 5
- Assigment 6
- Assigment 7
- Assigment 8
- Assigment 9
- Assigment 10
- Project 1
- Project 2
- Final Project
- Create anchors for all of the links (I prefer the anchors be in reverse order. Have the Final Project at the top
and Assignment 1 at the bottom.)
- Adding JavaScript to your page
- Create an assignment2 folder (no spaces in the name, no uppercase) in your public_html folder.
- Open your forestvilleFunding.htm page from your assignment1 folder in your editor.
- Save forestvilleFunding.htm to your assignment2 folder.
- Add the script tags shown on the bottom of page 33 to your forestvilleFunding.htm document.
- Add the document.write methods shown on page 38 to your forestvilleFunding.htm document.
- Add the comments shown on page 39 to your forestvilleFunding.htm document.
- Modify your forestvillefunding.htm document with the changes shown on pages 40 and 41 and pages 41
and 42.
- Create the mortgage.js document described on page 43.
- Do not start with a template.
- Start with a blank page.
- Do not add the script tags on the js page.
- Be sure that you save with the js extension.
- Do not use the LTS validation for a js page.
- There is no JavaScript validator. If there are some errors, they may show up when you
preview the page, but not with the validator. JavaScript errors are very hard to find.
- Make the necessary changes to forestvilleFunding.htm to use the mortgage.js source just created.
- Modify your forestvilleFunding.htm page to add CDATA to the script sections as shown on page 45.

Case Project:
- Complete Case Project 1-4 found on page 57 of your text.
- Download the js_styles.css style sheet.
- Open your template.htm page.
- Save as jungleTours.htm in your assignment2 folder.
- Follow the steps described in the text but start with the template so that you will
have the validation icons on your page.


Update your index page:
- Add links on your index page to the pages in your assignment2 folder that are to be graded:
- forestvilleFunding.htm
- js_styles.css
- mortgage.js
- travel.js
- forestvillefunding_styles.css
- jungleTours.htm
Uploading:
- Upload your revised index.htm page to the public_html folder.
- Upload your assignment2 folder with the files:
- forestvilleFunding.htm
- js_styles.css
- mortgage.js
- travel.js
- jungleTours.htm
Testing uploaded pages
- Follow the checklist for grading shown on
the schedule page.
- Make any corrections for any page that does not validate or display correctly.