|
Since I discovered PHP, I don't do as much JavaScript
work as I used to but when you need client-side validation or don't want
to rely on a server for functionality, JavaScript is what you need.
Here's some JavaScripts I've written. As always, comments,
bug-reports and feedback is always appreciated: Menu Script
- download (11K)
- See the navigation menu to the left? That menu is generated
through Javascript. Yes, I could use SSI and library objects (I
use Dreamweaver to maintain this site) and such but I like
to use Javascript. The best part about this script is that you
change once, write everywhere - to
add/delete/modify the menu you change the library, not every single
friggin' page on your site. Takes seconds!
Date Script
- download
(4K) - See the date near the top-right of the page? That is
generated through a Javascript I wrote. Originally I wrote it
to generate a link to a website for their most current page but
they changed their format. I cleaned it up, abstracted it a bit
and present it here for you to use. I've got a bunch of ideas
about improving it (listed in the script) but for now you'll have
to settle for the ability to change the format.
Breadcrumbs
Script - download
(4K) - I like 'breadcrumbs' on websites, they are a great
way of enhancing navigation. For example, a 'breadcrumb trail'
for this page might look something like this:
You are here: Home
> Technology > Javascripts
I wrote this script for use on the LearnLink
website a few years ago. Amazingly, they still use it even though
the site has gone under a serious redesign.
Pull-Down
Menu Script - download
(3K) - You'll also want the library
script (2k) that goes with it. I hesitated to even put this
script up here - it's only a single line! But, it works nicely
on my recipe page and I see
potential for using this as an object in other scripts so here
you go!
|