FIXIT MENU:
home about us contact us

WHAT'S AVAILABLE:
free scripts advanced scripts online tools great books web related tutorials contributed tutorials news archive geek toys!

SUPPORT:
help forum live chat help

Some General JavaScripts You Can Use On Your Site

Over the years we here at HTMLfixIT.com (that means Franki and Don) have used JavaScript for many things. Often in our chat room or on the forum someone will ask for a snippet or two, or a simple script. We usually answer the question and then move along. We hope to consolidate some of them with some global appeal here.

Keeping Your Site Copyright Notice Up to Date Automatically with Javascript.

It may be important to keep your copyright notice up to the current year. Of course it may make your site look stale if it is outdated. In addition, if you add content and do not make the corresponding date change, it may impact your claims to copyright. We have a simple little script you can include. Part one goes in the head section of a web page and part two goes in the body where you want the copyright notice to appear. Here is a plain vanilla page with the details.

UPDATE: Also see Version two, an updated version that will still display a copyright notice on browsers without JavaScript.
(Very important for a copyright notice to be visible at all times for legal reasons.)


DHTML, Layers, Javascript and Z-Index for drag and drop exercise.

Franki and Don often get started on one project and get sidetracked on another thing. I guess that is what makes this all fun ... cause the donations have yet to overwhelm the coffers :-) While working on making our RGB Color Tool work in Mozilla/Firefox browsers, which I might add was probably inspired when someone at mozilla.org actually bought one of our scripts, we realized we needed to have a better grasp on two things: (1) how to trigger tracking layer or div dragging by tracking mousedown dragging, and (2) how to recognize a Mozilla browser and how to cross-browser use our javascript in Internet Explorer and Mozilla. So we dug in and went to work!

We found a good layer drag exercise but didn't like a few things about it, so we modified it a little. In the first version which we ripped off here, the bottom row of draggable boxes isn't visible on most screen resolutions without scrolling. So we took the bottom row and moved it up, re-numbered the boxes and present is as version one, dhtml draggable boxes (which are div layers), but not that the numbers stay stacked in the order they are numbered so that they essentially slide one under another. I didn't like that ... because I wanted the box I dragged to stay on top. So I dug in -- despite Franki yelling at me: "stay on task Don" -- and re-did the z-index to always stack my dragged layer to the top. So here is my version with the z-index re-written on the fly by my javascript.

This appears to work with Internet Explorer 6.x, FireFox, Firebird, Safari, and Konquerer. We would be happy to know if it works in your browser if you don't mind using our contact form and reporting your experience.


So if you are ready to learn more:
Back to the Tutorial Index