Page Detail Scripts
These scripts all deal with Page Detail JavaScripts. There are several scripts that do make a site more pleasant to visit. You can write the time a visitor entered the page, how long they've been there, write when the page was last updated, whether it was updated since you last visited, and lots more! They are very difficult to write - just look at the code. General questions about page detail JavaScripts here should be posted to The JavaScript Forum.
-
Custom JavaScript Dialog Boxes
A lightweight JavaScript dialog box library. The script offers four dialog styles: alerts, warnings, prompts and success. The DIVs are dynamically added to the DOM when the function is called. Easy to implement.
-
Copyright Notice
This unobtrusive script will update the current year for the copyright notice on a page. No need to worry about changing it from year to year. Very easy to implement.
-
Create a Color Palette
Have you ever wanted to let others know the color palette that you use on your Web site? Or perhaps you need to figure it out yourself. This small script, along with a copy of MooTools (included), will create a palette of your Web page (images not included) that would please even the likes of Pablo Picasso.
-
Change Layer Colors
Use these two simple functions to change text and background colors within a specified layer without reloading the page. Can be used separately or together.
-
Page-Details : Document Text Replace
This script will find any instance of a chosen word and swap it out for another. Helps to keep your pages looking good. Very easy to use!
-
Page-Details : Screen Resolution Detect/Redirect
This very simple script detects the screen resolution of the user, and redirects them to the appropriate URL. It only needs to detect the screen width, making it compact and quick.
-
Page-Details : Making Columns Render with Equal Height
A problem sometimes faced by Web developers is trying to get two (or more) columns in a multi-column layout to be the same height when the content is variable. Rather than using an arbitrary hardcoded value, the heights can be equalized (to the tallest one) with this script.
-
Page-Details : Page Index
This is an incredibly simple script. It pulls each H4 element and creates a clickable index to it. It stuffs the headings it finds in a division named indexDiv and if it didn't find any H4 tags it will even make the indexDiv invisible. You can also change it to use any other heading element.
-
Page-Details : _GET Web Address Reader
This script will allow you to grab variable-value pairs from the URL of a page, much like PHP grabs data from the URL. It places foo=bar data in a JavaScript object called _GET, and can be referenced similar to $_GET in PHP.
-
Page-Details : Size Wisely
Use this script in your onload events to kick-start your Web pages with the right relative font size. It checks the screen resolution (not the browser size) and sets the base 'em' size accordingly.
-
Page-Details : Delayed Image Loader
Use this script to delay the loading of a particular image. It can be used to delay the loading of large images or banner advertisements. A smaller image is loaded first, which can be transparent or blank. After a designated amount of time the larger image will load in place of the smaller one.
-
Page-Details : Fade Anything Technique
Need to draw attention to something new on your Web page? Only need to show it for a moment or two? This script will highlight it in a subtle manner (or boldly, if you choose).
-
Page-Details : Percentage Progress Bar
Use this script to display the percentage of page data loaded. The progress bar is displayed in the status bar at the bottom of the browser.
-
Page-Details : Week Day Image w/URL
Display a new image every day of the week, with a link to a specified URL for that day.
-
Page-Details : Format Footnotes
Arrange your footnotes in a format that is easy-to-read and navigate. This script makes it easy for your readers to return to where they were in the document.
-
Page-Details : Disable Text Selection
Use this script to disable the selection of text on a page. It's very simple using two of the built-in JavaScript events to cancel the selection before it starts. You can even attach the events to a specific element.
-
Page-Details : Last Modified (Advanced)
This script will display a default "last modified" date in the event the server is not able to configure it. A good backup solution.
-
No Right Click 2
This script displays an alert box when a visitor right clicks on an image. IE only. (Note: This script is not fool-proof. Visitors can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect.)
-
Content Center
Build fluid Web pages that adjust according to the size of your visitor's monitor settings. This script uses the
screen.availWidthandscreen.availHeightproperties to detect your visitor's screen resolution. -
Refresh Page - Automatic
Keep your content fresh. Use this script to automatically reload a fresh copy of your Web page from the server. You determine the time delay between refreshes.
-
Grab and Scroll Page
Users can scroll the page by clicking on it and dragging the mouse, similar to the functionality found in the Acrobat viewer.
-
Right Click Sparks
This script disables the right click. Instead of an alert, sparks follow the cursor. IE only.
-
Refresh Page
Keep your content fresh. Use this snippet to reload a fresh copy of your Web page from the server. Use either a button or a link. It's compact but very effective.
-
New Content
Highlight new content or special items on your site for a specified amount of time. This script will display a "new" icon and highlight the header of the content until the date you set has expired. (You could also use it to highlight the content itself.) Adapted from "New Links" by Nicolas.
-
Automatic Copyright Update
Make sure your copyright notices are up-to-date. This script will automatically update your pages for you.



