Seneca College main page

Advanced HTML

BCS 500

Seneca College, Newnham Campus, Toronto, Canada
the principle tag editor we use for BCS 500
Section A Section Images Section B Section Sound Section Java Section MKT Section XML
Detailed Course Outline
SECTION JAVA

 www.witiger.com/senecacollege/BCS500/BCS500classlist2001.htm

this page last updated 2001 Dec 03

.
click here to go the W3C page to check the pages that you are building
.
BCS 500 page explaining
Group Assignment, and Practical Assignment
 http://www.witiger.com/senecacollege/BCS500/assignments500.htm
.
Java Applets


page 404~413 
in the text

Java Applets from Anfyjava.com
go here to download the Anfyjava software that will allow you to create Java Applets
 http://www.anfyteam.com/ajdownl.html
Click right
for the main
Anfy
Java
web
page
http://anfyteam.com/index.html
 
.
Programming
with
Javascript
Javascript is a subset of Java - it does not=Java
Javascript was created by people at Netscape and Sun
Javascript commands can be written directly into an HTML page to allow people to create web pages that are programmable - meaning pages that show dates, change colours, add numbers etc

Web pages made with Javascript will show up in Netscape and I.E.
Internet Explorer uses a variation of Javascript called JScript.

It Doesn't always work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Just like some HTML commands show up in Netscape and not in I.E.
- also some Javascript commands show up in Netscape, but not in I.E.
- and some JScript commands show up in I.E., but not in Netscape

.
Java Applet
Navigation
example of a drop down menu

in the form of a Java Applet

the code for this is

<applet CODE="link.class" WIDTH="290" HEIGHT="38">
<param NAME="target" VALUE="_top">
<param NAME="number" VALUE="9">
<param NAME="link0" VALUE="Internet and HTML Navigation links\\no link">
<param NAME="link1" VALUE="BCS500a\\http://www..........htm">
<param NAME="link2" VALUE="BCS500b\\http://www.witiger.com/senecacollege/BCS500/outline500b.htm">
<param NAME="link3" VALUE="Section Three\\http://www.........htm">
<param NAME="link4" VALUE="Detailed Course Outline, Section Four\\http://www......htm">
<param NAME="link5" VALUE="Grading Details\\http://www...../grading234.htm">
<param NAME="link6" VALUE="COMP 234 splash page\\http://www.....COMP234.htm">
<param NAME="link7" VALUE="The Web Site from the text publisher\\http://..../index.html">
<param NAME="link8" VALUE="BCS500 \\http://www.witiger.com/senecacollege/BCS500/outline500a.htm">
<param NAME="link9" VALUE="COMP 234 MAIN PAGE for the course\\http://www.sob.cencol.on.ca/is234/comp234.htm">
</applet>

If you want to put this drop down menu on your page to help in navigation you need to
1.copy the code into your page (use notepad, or HoTMeTaL 6.0)
2. copy the link.class file
available  www.witiger.com/senecacollege/BCS500/link.class
3. load that file on to your server in the same directory as the page on which the applet will be
4. modify the links to fit your links
eg. change http://www.witiger.com/senecacollege/BCS500/outline500b.htm to your http://www......
5. if you have less/more than 9 links, change the row <param NAME="number" VALUE="9">
6. if your para NAME is long, you may have to change
<applet CODE="link.class" WIDTH="290" to a number higher than 290 so it will fit
.
 
http://www.witiger.com/internet/classfiles/ to get many of the java applets to work, you need to put in the code + you need the relevant "class" files.

To help you find the class files - to many of the common effects used in past classes - we have listed them in a sub-directory on witiger.com - click on the screen capture to the left

.
Java Applet
Navigation
example of a applet for textscroll
Sorry, your browser doesn't support Java(tm). 
the code is here 
<APPLET archive="txtscroll.jar" code="txtscroll.class" width="250" height="50"> 
<PARAM name="credits" value="Applet by Fabio Ciucci (www.anfyteam.com)"> 
                            <PARAM name="backimage" value="NO"> 
                            <PARAM name="backR" value="0"> 
                            <PARAM name="backG" value="0"> 
                            <PARAM name="backB" value="0"> 
                            <PARAM name="overimg" value="NO"> 
                            <PARAM name="overimgX" value="0"> 
                            <PARAM name="overimgY" value="0"> 
                        <PARAM name="textscroll" value="BCS500.txt">
                            <PARAM name="texttype" value="horizontal"> 
                            <PARAM name="textvspace" value="0"> 
                            <PARAM name="textminfont" value="8"> 
                            <PARAM name="textmaxfont" value="172"> 
                            <PARAM name="textoffset" value="40"> 
                            <PARAM name="textspeed" value="2"> 
                            <PARAM name="textfont" value="Helvetica"> 
                            <PARAM name="textbold" value="NO"> 
                            <PARAM name="textitalic" value="NO"> 
                            <PARAM name="textsize" value="24"> 
                            <PARAM name="textshadow" value="NO"> 
                            <PARAM name="TextSColR" value="20"> 
                            <PARAM name="TextSColG" value="20"> 
                            <PARAM name="TextSColB" value="50"> 
                            <PARAM name="TextColR" value="250"> 
                            <PARAM name="TextColG" value="230"> 
                            <PARAM name="TextColB" value="120"> 
                            <PARAM name="TextJumpAmp" value="0"> 
                            <PARAM name="TextJumpSpd" value="0"> 
                            <PARAM name="TextSineAmp" value="6"> 
                            <PARAM name="TextSineSpd" value="3"> 
                            <PARAM name="TextSineAngle" value="2"> 
                            <PARAM name="regcode" value="NO"> 
                            <PARAM name="reglink" value="NO"> 
                            <PARAM name="regnewframe" value="NO"> 
                            <PARAM name="regframename" value="_blank"> 
                            <PARAM name="statusmsg" value="TxtScroll applet"> 
                            <PARAM name="memdelay" value="1000"> 
                            <PARAM name="priority" value="3"> 
                            <PARAM name="MinSYNC" value="10"> 
                            Sorry, your browser doesn't support Java(tm).&nbsp; 
                            </APPLET>
. To make the textscroll applet work, you need to

1. copy the code into your page (use notepad, or HoTMeTaL 6.0)
2. create some words in a file and save it as XXX.txt
3. load that text file on to your server in the same directory as the page on which the applet will be
4. you need to obtain a copy of "txtscroll.jar" and "txtscroll.class" files
  do this by "right button" clicking these
 www.witiger.com/senecacollege/BCS500/txtscroll.class 
 www.witiger.com/senecacollege/BCS500/txtscroll.jar 
5. then you need to also load those files on to your server in the same directory as the page on which the applet will be

.
 
. see  http://www.pageresource.com/jscript/index2.htm
The Basics- JavaScript Tutorial http://www.pageresource.com/jscript/jbasics.htm
http://www.pageresource.com/jscript/jbasics.htm
you may also try
A Beginner's Guide to JavaScript by Rajesh Vijayakumar 
Vijayakumar says Javascript can be thought of as an extension to HTML which allows authors to incorporate some functionality in their web pages. So now, whenever the user  presses the SUBMIT button, you don't necessarily have to invoke a cgi script to do the processing. If it is something simple, you can do the processing locally using Javascript nd give back the results. Javascript can also be used in a  number of ways to spice up your page. 
 http://jsguide.simplenet.com/

see  http://jsguide.simplenet.com/tips.html
The normal HTML code for a hyperlink might be something like this: 

                   <A HREF="mylink.htm">Click here</A> 

To display something on the status bar when the mouse is moved over this link,  you need to add a little more: 

                   <A HREF="mylink.htm" onMouseOver="window.status='Click
                   here to know more about me'; return true;"
                   onMouseOut="window.status=''; ">Click here</A

Special Effects
- one of the things you can do on a page which really bugs people !!!, is to have a flickering effect when the page loads - essentially this is just a rapid alternating of the background colours. To see what it looks like, and to get the Javascript to do it, 
go here (seen best in I.E.)

.
 
Java 
and 
JavaScript
- differences
 
 
 
 
 

Java 
and 
JavaScript
- differences
 
 
 
 
 
 
 
 
 

Java 
and 
JavaScript
- differences
 

Java and JavaScript
JavaScript and Java are similar in some ways but fundamentally different in others. 
The JavaScript language resembles Java but does not have Java's static typing and strong type checking. 
 http://developer.netscape.com/docs/manuals/communicator
/jsguide4/getstart.htm#1009450  This is a very helpful page for students to read

JavaScript compared to Java
JavaScript Java
Interpreted (not compiled) by client. Compiled bytecodes downloaded from server, executed on client.
Object-based. No distinction between types of objects. Inheritance is through the prototype mechanism and properties and methods can be added to any object dynamically. Object-oriented. Objects are divided into classes and instances with all inheritance through the class hieararchy. Classes and instances cannot have properties or methods added dynamically.
Code integrated with, and embedded in, HTML. Applets distinct from HTML (accessed from HTML pages).
Variable data types not declared (loose typing). Variable data types must be declared (strong typing).
Dynamic binding. Object references checked at runtime. Static binding. Object references must exist at compile-time.
Cannot automatically write to hard disk. Cannot automatically write to hard disk.

 

.
Chpt 13

Java and
Dynamic
Documents

JavaScript
 

This course is primarily focusing on teaching you as much of the HTML 4.0 as possible. However it is recognized that to build kewl web pages these days requires knowledge of other techniques as well - for example JavaScript HTML is designed to format and display items to the screen. However if you want your web pages to interact with the user, in the past you needed to write a CGI script to be placed on the server. CGI scripts are capable, but they often require some tricky programming and server knowledge. Another alternative is to use JavaScript, which is easy to learn and use. JavaScript runs on the client and is embedded within the HTML code, so its easy for people comfortable with HTML - says Kelly Murdock in Chapter 23 of Darnell's book, HTML 4 Unleashed 

Javascript was created by Netscape. JavaScript is Netscape's cross-platform, object-based scripting language for client and server applications.It is a scripting language that you can use to write programs to include in your HTML pages (page 387 Keith Roberts)

Explanation of how JavaScript came to be. JavaScript is sometimes considered a subset of the programming language Java - but this isn't true. As Sun was working on defining Java, Netscape was creating a scripting language for their LiveWire product called LiveScript. Java got released first. Netscape realized that LiveScript would be useful as a way to interface with Java and contacted Sun with the idea. Sun helped Netscape rework LiveScript and called it JavaScript. Although it does have some syntax that's similar to Java, JavaScript is not a derivative of Java

Link to page on Netscape's site that has many other links to Java related information and description 
 http://developer.netscape.com/docs/manuals/index.
html?content=javascript.html

There are two types of JavaScript
     Navigator JavaScript, also called client-side JavaScript 
     LiveWire JavaScript, also called server-side JavaScript 

Embedding JavaScript in HTML 

To inset JavaScript within a Web page, the <SCRIPT> tag should be used. It is a container tag so it should be closed with </SCRIPT> 



"JavaScript Developer Central" Netscape's prime page for beginning to learn about JavaScript 
http://developer.netscape.com/tech/javascript/index.html?cp=dev01mtec
http://developer.netscape.com/tech/javascript/index.html?cp=dev01mtec
.

JScript, created by Microsoft Corporation, is similar to JavaScript (by Netscape) in that it 
also is a scripting language used to add functions to your pages.
JScript is only recognized by Microsoft Internet Explorer and will not show up well on people's screens who use Netscape. 
Check Microsoft's scripting site at 
 http://msdn.microsoft.com/scripting/default.htm

http://msdn.microsoft.com/scripting/default.htm?/scripting/jscript/default.htm

VBScript - there are other scripting languages besides JavaScript. VBScript also comes from Microsoft 

examples of VBScript can be seen at
 http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/samples/vbssamp.htm

.
BCS 500 page explaining
Group Assignment, and Practical Assignment
 http://www.witiger.com/senecacollege/BCS500/assignments500.htm
..
 to go back to main menu
 www.witiger.com/senecacollege/BCS500.htm

http://www.witiger.com  home page