Faculty of Information Technology and Multimedia Communication
Faculty of Information Technology and Multimedia Communication
January 2011
CBWP2203
Web Programming
MATRICULATION NO : 800717126061001
IDENTITY CARD NO. : 800717-12-6061
TELEPHONE NO. : 014-3343554
E-MAIL : [email protected]
LEARNING CENTRE : OUM, Petaling Jaya
CBWP2203
TABLE OF CONTENTS
Page
1
CBWP2203
HYPERTEXT MARKUP LANGUAGE (HTML)
HTML is set of specifications that can be used to define the elements of hypertext
document. Web browser like an Internet Explorer act as platform to interpret it in correct
form.
Below page are screenshot of HTML document in form of frameset and using Internet
Explorer as web browser. The next page showing some function when embedded with
javascript and vbscript.
1. MAIN PAGE
2
CBWP2203
2. JAVASCRIPT IN ACTION
Valid email address displayed when correct format email inserted and “Validate” button
clicked.
Invalid email address displayed when incorrect email format inserted and “Validate” button
clicked.
3
CBWP2203
Message showed when option checked and “Process” button clicked.
4
CBWP2203
3. VBSCRIPT IN ACTION
HTML CODES
The next page are all files which written in HTML codes. All HTML codes are written in
accordance with Extensible Hypertext Markup Language (XHTML) standard.
All related files then validated using validation service to ensure all HTML codes follows the
XHTML standard at http://validator.w3.org.
5
CBWP2203
1. ASSIGNMENT.HTML
6
CBWP2203
2. COURSE INFO.HTML
7
CBWP2203
3. CONTROLS.HTML
8
CBWP2203
4. DISPLAY.HTML
9
CBWP2203
5. HTMLJAVASCRIPT.HTML
function submitOrder()
10
CBWP2203
{
var alertString = String("You are interested in: ");
if((document.orderForm.programmesCB.checked == false) &&
(document.orderForm.coursesCB.checked == false) &&
(document.orderForm.campusCB.checked == false))
{
alert ("No option selected!");
return true;
}
if(document.orderForm.programmesCB.checked == true)
alertString += " Programmes Offered, ";
if(document.orderForm.coursesCB.checked == true)
alertString += " Short Courses, ";
if(document.orderForm.campusCB.checked == true)
alertString += " Visiting Your Campus ";
alert(alertString);
}
/*]]>*/
</script>
</head>
<body bgcolor="lavender">
<form name="myForm" onsubmit="return validateForm();" method="post" action="#">
<table border="0" width="400">
<tr>
<td width="100">Name:</td><td><input type="text" name="name" size="25" /></td>
</tr>
<tr>
<td width="100">Email Address:</td><td><input type="text" name="email" size="25"
/><input type="submit" value="Validate" /></td>
</tr>
11
CBWP2203
</table>
</form>
<br />
<form name="orderForm" onsubmit="return submitOrder();" method="post" action="#">
How can we help you?<br />
<input type="checkbox" value="programmes" name="programmesCB" />I'm interested in
your programmes offered.<br />
<input type="checkbox" value="courses" name="coursesCB" />I'm interested in short
courses.<br />
<input type="checkbox" value="campus" name="campusCB" />I'm interested in visiting
your campus.<br />
<br />
<input type="button" value="Process" onclick="submitOrder()" />
</form>
</body>
</html>
12
CBWP2203
6. VBSCRIPT.HTML
13
CBWP2203
SCREENSHOT VALIDATION
The validation page was done by using validator at http://validator.w3.org/. The process
made for all related files as follows:
1. assignment.html
2. course_info.html
3. controls.html
4. display.html
5. htmljavascript.html
6. vbscript.html
All files successfully validate as per XHTML standard. Validation screenshot attached for
reference. See next page for all related files screenshot.
14
CBWP2203
15
CBWP2203
1. ASSIGNMENT.HTML
16
CBWP2203
2. COURSE_INFO.HTML
17
CBWP2203
3. CONTROLS.HTML
18
CBWP2203
4. DISPLAY.HTML
19
CBWP2203
5. HTMLJAVASCRIPT.HTML
20
CBWP2203
6. VBSCRIPT.HTML
21
CBWP2203
REFERENCES
Checkbox.(2011).[Online]. Available: http://www.java2s.com/Tutorial/JavaScript/0200__
Form/Checkbox.htm [2011, February 17].
Help and FAQ for the Markup Validator (2011).[Online]. Available: http://validator.w3.
org/docs/help.html [2011, March 3].
HTML 4.01 / XHTML 1.0 Reference (2011).[Online]. Available:http://www.w3schools.
com/TAGS/ref_byfunc.asp [2011, February 8].
Malaysia. Faculty of Information Technology and Multimedia Communication. Open
University Malaysia. (2011). Module CBWP2203 Web Programming. Open
University Malaysia.
Recommended Doctype Declarations to use in your Web document. (2011).[Online].
Available: http://www.w3.org/QA/2002/04/valid-dtd-list.html [2011, February 5].
Target a frame using <iframe> (2011).[Online]. Available: http://www.dynamicdrive.com
/forums/archive/index.php/t-235.html [2011, February 7].
The Form and its Web Controls.(2011).[Online]. Available:http://www.functionx.com/
vbscript/Lesson03.htm [2011, February 10].
22