|
Advanced HTMLBCS 500 |
Section A | Section Images | Section B | Section Sound | Section Java | Section MKT | Section XML |
SECTION JAVA |
www.witiger.com/senecacollege/BCS500/BCS500classlist2001.htm
this page last updated 2001 Dec 03
Java Applets
|
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
|
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.
It Doesn't always work
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
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">
|
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 |
Navigation |
example of a applet for
textscroll
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). </APPLET> |
. | To make the textscroll applet
work, you need to
1. copy the code into your
page (use notepad, or HoTMeTaL 6.0)
|
. | see http://www.pageresource.com/jscript/index2.htm
The Basics- JavaScript Tutorial 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
<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
Special Effects
|
Java
and JavaScript - differences Java
Java
|
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
|
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.
There are two
types of 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 |
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 VBScript - there are other scripting languages besides JavaScript. VBScript also comes from Microsoft examples of VBScript can
be seen at
|