| Help!!!
|
There are a number of common problems that can cause your page to
not come up at all. Things like "Forbidden", "Not found", or just displaying a list of
files. Other problems are less serious in that your page is still displayed. However, what
is displayed isn't what you wanted. Things like when you just see a [ instead of your page,
your links don't work or don't show up, a large section of your page is blinking (or
bold/underline/etc) that you didn't intend to, or some new thing isn't showing up at all
(like a table).
|
|
|
|
|
| Why won't my page come up?
|
Web pages are kinda picky when it comes to getting the thing up
the first time. After that they are pretty friendly beings. (A little anthropomorphism
here). Here are some of the more common problems and some possible solutions:
- Netscape (or IE) says something like, "Not Found" or "404 Not Found". Possible fixes:
- Make sure you typed in the write address into the location bar. The url should look
like http://grove.ufl.edu/~c3063xxx but instead of xxx use the three letters
that make up your username (the grove account card we gave you).
- Make sure you the filename of your webpage is index.html and that it is located
in your public_html directory on your class grove account. If you named your file
wrong, then use the mv command to change its name, something like mv oldname
index.html (while in the public_html directory), or to move the file from the main
directory to your public_html directory type mv index.html public_html/ (assumming
your file is named index.html and you have
already created the public_html directory). See the Unix
Tutorial for more information on mv and other Unix commands and see Files for more explanation of
the terms directories and files.
- Check the permissions (see the next entry).
- If Netscape says something like, "Forbidden", "You do not have permission to see this
file", or "403 Forbidden" then try these:
- Login to your account and type ls -l and see if the permissions (the first
block of letters) for the
directory public_html are drwxr-xr-x or drwx--x--x (preferably the first). If
they aren't then type chmod 755 public_html to set the permissions for the
public_html directory.
- Check the permissions on the index.html file. Login, then type cd public_html,
hit enter, then ls -l. See if the permissions for index.html are -rw-r--r--
and if not type chmod 644 index.html to make index.html readable on the web. See the
Unix Permissions for
more information on permissions.
- If your page just says something like public_html in blue (a link):
- Make sure your index.html file is inside the public_html directory (a command like
mv ~/index.html ~/public_html/index.html will fix this problem IF your index.html is in the
root (main, also called home) directory and you have already created your public_html
directory.
|
|
|
|
|
| My page isn't working right
|
- It is a good idea to run the HTML Checker as it can pinpoint
a variety of problems.
- If your page comes up blank or just has a [ or funny looking character on it:
- Check that you have a </title> tag between your title and the </head> tag.
- If your page comes up but without your links working:
- Make sure you have quotation marks (") before and after the URL for the page you
are linking to. Also, make sure you have some text between the <a> and </a> tags so
that there is something to click on. For example <a href="http://someurl">some text to
click on</a>
- If a particular link isn't working:
- Check the quotation marks.
- Check that you have text inbetween the <a> and </a> tags (In the example above
the some text to click on part. Otherwise you have a link but there is nothing to
display.
- Check that the url is correct. It must start with http://, for example a link
to the class home page might look like
<a href="http://grove.ufl.edu/~u3063bnk">CGS3063</a>
- If the rest of your text after the link is all part of the link:
- You probably just forgot the </a> tag after the text to click on part of the
link.
- If a large part of your page is blinking/bold/underlined/different color/etc:
- You most likely forgot the appropriate closing tag. For example to stop blinking
use </blinking>, the slash always goes at the beginning.
- If your table doesn't show up in Netscape (but it might in IE):
- You probably forgot the closing </table> tag after your table.
- Everything is showing up, but it is all on one line:
- Actually, this isn't a mistake. HTML purposely ignores blank lines in your
files. If you want to go to the next line use the <br> tag (no closing tag). You may
also want to experiment with the <p> tag (optional closing tag of </p>).
- Everything after my list is indented, why?
- You probably just forgot the closing list tag: </ul>, </ol> or </dl>
depending on what type of list you had (if you started with <ul> then end with </ul>,
and so on).
- I still can't seem to find the error in my html code?
- One thing to try is to use Netscape's handy color codeing. Bring up your page in
Netscape (this trick doesn't work in IE as IE doesn't do the coloring for you). Then
right-click on your page and select "View Source", you can also do this by going to the view
menu and selecting "Page Source", also you can press Control and "u" at the same
time. Netscape brings up a new window with your html code in it.
- See if any parts are blinking or in really bright blue. If so, this is Netscape
telling you it can't figure out what you did (an error). Look at the beginning of that
section and search carefully for errors such as missing a >, having an extra <, or
missing a ".
- Look at the part of your code that isn't doing what you want it to do. Netscape color
codes the code like this:
- purple for tag names
- bold black for attributes
- light blue for things in quotations (between a
pair of ")
- green for escape tags (things like &xx;)
See if any thing is the wrong color as it means Netscape isn't seeing it right. For
example, if you see something in blue (quotes) that shouldn't be, then most likely you
missed a closing " earlier (check your links). If a tag is shown in purple then you
probably forgot a > earlier on the last tag.
- Check that all of your closing tags are </tag> and not <tag/>. One way to do
this is using Pico's search ability. While editing your page in Pico press Control and w at
the same time (w for "Where is") and then type "/>" without the quotes at the prompt that
says Search [] : and press enter. If it finds /> (which should not be there) then
it will but the cursor at that spot. If it can't find a /> then it will say at the bottom
[ "/>" not found ]
|
|
|
|
|
| My Javascript isn't working
|
Many problems in Javascript come from the naming (or rather,
misnaming) of variables. Though Javascript allows you to choose variable names as whatever
you would like them to be, you do need to be consistent. So if name something "pic", then
you need to always refer to that thing as "pic". Two general things to consider for any
problems in Javascript are: Did you forget a semicolon? and are your " and ' paired up
correctly.
- My question (prompt) never comes up??
- Make sure that your <script> tag comes after the </title> tag and
before the <head> tag.
- You need to use a "prompt" statement between your <script> and
</script> tags (reread the QuickRead for what a prompt is).
- If you have frames, then DON'T put the prompt statement in index.html, instead put
it in one of you other html files (like main.html or hobby.html).
- My message always/never prints no matter what I type in at the prompt?
- Your if statement (see the Quickread for how to use an if) must be within the
same set of <script> and </script> tags.
- You need to use the same variable name for both the prompt and the if statements
(so if you say something like
var answer=prompt (...
Then you should use the name answer in your if statement
if (answer == "No") { ...
- Javascript is case sensitive in many respects. If you call the variable
userinput in one place then don't call it Userinput in another. Also, if the user types in
"No", that is not the same as "no".
- My onClick (or onMouseOver) doesn't change anything or changes the wrong picture..
- This is probably a naming problem. Your code for onClick uses a variable name in
two places: as the value for the attribute name in the img tag ( <img src=picture
name=variable...>) and also in the onMouseOver part of the a tag (<a
href="#" onClick="document.variable.src='....>). You can use any name you want, but
both places need the same name. Also, if you have multiple onMouseOver and/or onClick
events on the same page, they will each need a different name. The idea is that you give
the picture a name so that you can refer to that picture in Javascript and your browser will
know which picture you are talking about (If both the onClick and onMouseOver events use the
same variable name, the browser won't know which picture is which).
|
|
|