Page Detail Scripts | JavaScriptSource

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.

  • Infinite Scroll Using Ajax by Manideep
    Manideep Feb 1, 2016

    Instead of showing results in different pages, retrieving all the results in a single page using simple javascript code.

  • Custom JavaScript Dialog Boxes
    Michael Leigeber Feb 25, 2009

    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
    Spike McLarty Sep 26, 2008

    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
    David Walsh May 16, 2008

    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
    Antonio Lupetti Mar 17, 2008

    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
    Corneliu Rusu Oct 17, 2007

    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
    Sep 21, 2007

    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
    Roy Marchand Apr 23, 2007

    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
    Patrick Hunlock Apr 11, 2007

    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
    Greg Burghardt Mar 2, 2007

    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
    Patrick Hunlock Feb 7, 2007

    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
    Sandeep Gangadharan Feb 2, 2007

    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
    Adam Michela Dec 11, 2006

    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
    Thai Phong Nov 1, 2006

    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
    John Hobbs Jul 17, 2006

    Display a new image every day of the week, with a link to a specified URL for that day.

  • Page-Details : Format Footnotes
    Timothy Groves May 1, 2006

    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
    James Nisbet Feb 10, 2006

    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)
    Thomas Jobe Jan 3, 2006

    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
    Aug 26, 2005

    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
    Aug 24, 2005

    Build fluid Web pages that adjust according to the size of your visitor's monitor settings. This script uses the screen.availWidth and screen.availHeight properties to detect your visitor's screen resolution.

  • Refresh Page - Automatic
    Lee Underwood Aug 5, 2005

    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
    Abraham Joffe Jul 27, 2005

    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
    Kenny Orovic Jul 11, 2005

    This script disables the right click. Instead of an alert, sparks follow the cursor. IE only.

  • Refresh Page
    Lee Underwood Jul 8, 2005

    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
    Lee Underwood May 27, 2005

    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.