CSC309, Assignment 1, Clarification Page
- Q4.3 Note that, if you load the editor textarea from
the display frame, the validator will always complain that
your code is invalid XHTML. This is because it is lacking the
basic XHTML (in particular the doctype). This is normal. Don't
worry about it. The task is merely meant to make you understand
how to connect to basic services on other web sites.
- Q4.3 You still need to ensure that correct
XHTML code typed directly in the textarea or loaded by the applet
in Q3 will be shown as valid by the validator.
Conversely, XHTML errors in the textarea content
should be found by the validator (as if that content
were typed directly in the textarea on the validator.W3.org page).
- Q3.1 Some people were confused by what to return.
Please return the entire content of the file found under
the given URL. You do not have to distinguish based on the kind
of the file. If the user of your editor (somewhat wrongly) uses
it to load non-html or even binary files, that's not of your
concern. Just plainly return the file's content. The purpose of
this task is to get you going on the interaction between
JavaScript and Java applets, and to show how to dynamically
retrieve content of the web using Java. (Later in the course you
will learn about the much more elegant, web-2.0-ish way of doing
this using AJAX.)
- Q3 Note that java may not allow you to retrieve a file
from a server other than your own, i.e. where your applet
resides. This is ok, don't worry about it. Just test with a local
file, say in the same directory on the server.
- Q1 Here is a sample display.html file that you may find
useful for testing your code. Note that there are no requirements
of what display.html has to contain, so you may very well use
this file. Please make sure to download and copy the file to your
own directory. Otherwise your code may not work since the access
to the innerHTML of pages not residing on the same server is
sometimes restricted.
In the marking process we will use
this file (possibly among others) to evaluate your code.
- Q2.1 When we say 'all available element names' we
really mean 'all available element IDs'. Sorry for the confusion.
Further in Q2.1, you only have to catch 'space-' and 'enter-key'
events that happen in the text area.
- Q4.1 + Q4.2 When getting the current value for the
attribute of the indicated ID, please show the result in the
'value' textbox, so it can be edited easily.
- Q3 If you are stuck here and don't know how to get the
connection between JavaScript and your Java applet going, have a
look at slide 15 in the Java.pdf lecture slides.
- Submitting your files Please have a look at http://www.cdf.toronto.edu/workathome/index.php3?id=29
for how to submit your work and please use 'A1' as the assignment
name.
- Q3 Some people were confused by the text area
appearing inside the java applet in the screen shot. This is not
required, I just used it to print some debugging output. In
particular, the screen shot does not impose any further
requirements. All that is required is described in the assignment
handout text.
- Q3 If your Java applet doesn't run under Konqueror,
don't worry about it, as long as you get it to work correctly
under Firefox.
As a general hint, something that may or may not have been said
in class: You can always invoke a javascript function foo() from
a link like this: <a href="javascript:foo()">invoke</a>.
Christian (TA for A1)