|
Posted by David Dorward on 10/16/55 11:17
William Hughes wrote:
> Situation:
>
> I am using the following Javascript
Your subject line talks about Java. Java and JavaScript have about as much
in common as Car and Carpet.
> <script language="JavaScript">
Missing required type attribute.
> if (navigator.appName.indexOf('Microsoft') != -1)
> else if (navigator.appName.indexOf('Netscape') != -1)
User agent string detection instead of object detection with no provision
for most modern browsers.
It is not a good script. I strongly suggest you ditch it.
> <br><br>
Use margins, not multiple hard line breaks.
> <center>
Deprecated. Use CSS.
> <!--Button Number 16-->
> <a href="print.htm" target="_self" onmouseover="lighten('name15');
> window.status='Go to the Print References page'; return true"
Most browsers let users block mucking about with the status bar - and with
good reason - its annoying and hides useful information from the user. I
suggest you get rid of that. Consider the title attribute for advistory
information.
> onmouseup="darken('name15')"><img src="./img/btn-print.bmp" name="name15"
..bmp files are highly inappropriate for use on the web. Try PNG, JPEG or
GIF.
> alt="Click button to go to the Print References page" border="0"></a>
The alt attribute is supposed to be a text replacement for the image, not a
tooltip. See my previous reference to the title attribute and try:
alt="Print References"
> <!--Button Number 17-->
> <a href="video.htm"
There is a distinct lack of anything between the links, this can cause it to
be difficult to tell where one link ends and the next starts (especially in
text only browsers). Try marking up the list of links as a list.
http://css.maxdesign.com.au/listamatic/
> Both code sections are loaded with #INCLUDE statements.
I'd suggest using <script src="..." ...></script> for including the
JavaScript. That will let the user cache it between pages and save
bandwidth (yours and theirs).
> If I use the same button more than once in the body of the page, only the
> first instance is animated; the subsequent uses are not, although they are
> functional. What am I doing wrong?
Probably having two elements with the same name and trying to reference them
by it.
> Also, I am considering eliminating the ONMOUSEOUT statements. If I
> undertand the function correctly, this will cause the ONMOUSEOVER and/or
> ONMOUSEDOWN text to remain in the status bar. Is this correct?
Try it and see.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
[Back to original message]
|