architect wrote:For the Onload script can it have more than one feature? Can it prevent image theft and also run the left menu images? Well, actually it is doing this now, but is there a better way of coding this?
Yes, you just need to separate each function call with a semicolon (;) like so:
onLoad="do_something(); do_Something_else();"
The second semicolon is not required, but it is good practice. To be more specific to the page in question:
onLoad="trap(); MM_preloadImages(lots of parameters);"
(This stuff stays inside of the <body> tag where it currently is)
* * * * * * * * * * * * * * * * * * * * * * * * * * *
While I'm yapping, I may as well talk about those inline style tags. It is generally best to keep all of your style definitions in one place. You can use an external style sheet (which is the best option, but I won't explain how to do because I don't remember off the top of my head), or place the style definitions between <style> and </style> tags somewhere within the head of the document. (Within the head would mean between the <head> and </head> tags)
Instead of giving those four links on the sets page inline style tags, you could instead give them a "class" to mark them as being different than the rest of the links on the page. Example:
<a href="the_url" class="blackLinks">
Class can equal whatever term makes sense for you. Now you just have to add some style definitions for this class of link:
<style>
<!--
a.blackLinks
{
text-decoration:none;
color:black;
}
body
{
margin: 0px;
}
-->
</style>
Notes:
* This style stuff must be in the head
* You need to surround the contents of the <style> tag with HTML comments (<!-- blah blah blah --> so it will be ignored by older browsers that do not understand the style information.
* Where it says "a.blackLink", "blackLink" should be whatever class value you have specified for the links you want the style applied to. Just using "a" without a ".something" after it will apply the style to all links.
* the body stuff is included to show how to format multiple style entries within one set of style tags (which is how you should do it) Also, the body style above will allow you to remove the margin attributes from the <body> tag that were generating some of the (minor) error messages on the HTML validator.
* If you want to know how to have the style information on a separate page instead, Google for "HTML <link> CSS"
Benefits to doing the style tags this way:
* This method is more widely supported by browsers than using inline style tags.
* If you want to change the style tags, you only need to change them in one place instead of many.
* Code is easier to read
* On larger samples, this method will result in smaller file sizes which uses up less server space and bandwidth.
Oh... wow, I didn't mean to go into such a long explanation on CSS. Oh well, it passes time while I'm at work and it may be of some benefit.