Chris Holden .com

Code » Javascript

  • DOM Marquee

    posted at 8 July 2006

    The <marquee> tag is not part of the HTML specification, it was invented by Microsoft and gradually over time support for displaying it has been built in to newer browsers. But if you want to scroll content on your webpage and use the marquee tag, the page wont validate. The solution is to use javascript. For browsers that dont support…

  • Graphical Checkboxes

    posted at 7 July 2006

    HTML forms arent the easiest to style, you inevitably have to put up with the bog standard looking radio, checkbox and selects. This script lets you replace the ugly checkboxes on a webpage with your own fancy graphics!RequirementsWell first of all you will need to download the script (at the bottom of the page). After that you need to create…

  • Formatable Timezone Clock

    posted at 27 November 2005

    Introduction This is a simple timezone clock with variable format. It has one required parameter and one optional parameter. The first param is a string containing the format of the clock. This can contain HTML or text, the format characters are in the comment at the beginning of the script. The second parameter is optional and is the…

  • Javascript Date Format

    posted at 24 November 2005

    There is no easy way to format dates and times in javascript. You have to awkwardly calculate week numbers, work out am or pm indicators and have arrays of day and month names. PHP on the other hand, has an incredibly useful function, date. The PHP function takes one mandatory option and one optional. The first argument is a format string…