String.addCharAt()





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2  ...  8 9 10 11 12 13 14 15 16 Next »
11
Date Submitted Thu. Oct. 5th, 2006 10:26 PM
Revision 1
Scripter Fordiman
Tags "stupid | clock" | JavaScript
Comments 1 comments
This is an analog clock script designed to jump in place of a div element of class 'analogclock'.

The div tag is not replaced in this custom element, but instead is used as a pseudo-document to hold the clock itself. The 'hands' are implemented using arrays of generated divs.

I was actually inspired to write this widget because of an article on About.com's Javascript pages written by a guy named Stephen Chapman. His code was a mess, but I only discovered this after delving through two layers of 'unescape()' obfuscation.

The basics: You control the look of the numbers and the 'box' model of the clock using basic CSS. You control the clock's size (it will always be square) using the 'size' attribute.

The 'seconds', 'minutes', and 'hours' attributes are for the color of the 'hand's. 'numstyle' can be 1, i, I, or '.', each refering to a different type of face-numbering for the clock

The 'localzone' attribute tells the script to use the user's local time zone. If it's '0', 'false' or 'no', the clock will use the 'clockzone' attribute to determine what time it is (the clock zone is relative to GMT, so, for example, US Eastern is -5. The clock automagically figures out if we're in DST, so you don't have to.)

The 'city' and 'country' are for if you want to put in the city/country of origin for your clock. To be honest, you can put anything there.

Lastly, I designed my version of the clock to be able to not 'tick', i.e., work like the old-school analog clocks. If you want ticking, add 'tick=1' to the attribute list

As with all of my widgets, the idea here is that you can just include the .js file and start dropping in tags without needing to know any ECMAScript at all.

Additionally, for you ECMAScripters, I was very careful to keep my pollution of the global namespace to one class: analogClock.

Example of use:




11
Date Submitted Sun. Oct. 29th, 2006 12:52 PM
Revision 1
Scripter SCoon
Tags JavaScript | PHP | Web
Comments 0 comments
Enforce loadig fresh script code for the external javascript files. Compatible with HTTP 1.0.
11
Date Submitted Mon. Nov. 6th, 2006 8:33 AM
Revision 1
Scripter Casper42
Tags conditional | JavaScript | loader
Comments 0 comments
This script will allow for conditional loading of javascript libraries. The example here only has one condition to check for IE or Firefox then loads the appropriate .js file.

This is part of an .aspx template for an educational portal product.

Usage for loading the script:

11
Date Submitted Mon. Nov. 6th, 2006 9:12 AM
Revision 1
Scripter Casper42
Tags JavaScript
Comments 3 comments
I found this to be a neat little trick for hiding(somewhat) source javacscript code from peering eyes...

This function will unload all linked javascript files so that when you view source - you see no javascript files! (Especially helpful when using FF and using web-developer tools - no linked js files are displayed) The files remain resident in memory - allowing for the functions to work.

Just call the function in the tag
11
Date Submitted Thu. Feb. 9th, 2006 2:14 PM
Revision 1
Helper Iain
Tags External | JavaScript | Links
Comments 0 comments
Enhance External Links
11
Date Submitted Thu. Feb. 9th, 2006 2:48 PM
Revision 1
Helper Iain
Tags Element | Fade | JavaScript
Comments 0 comments
Fade an Element
11
Date Submitted Thu. Oct. 5th, 2006 12:01 PM
Revision 1
Helper Idlemind
Tags ajax | JavaScript
Comments 4 comments
I use this in my AJAX as a quick way to get the Value of the selected item in a Select HTML object. If nothing is selected, it returns zero.
(May be basic to y'all, but maybe really usefull to someone else).
11
Date Submitted Wed. Jul. 5th, 2006 8:15 AM
Revision 2
Helper poncho
Tags Array | Name | PHP | String | Value
Comments 3 comments
Convert an irregular name=value pair string into a formatted array.
11
Date Submitted Mon. Oct. 9th, 2006 6:19 PM
Revision 1
Beginner strykstaguy
Tags firefox | JavaScript | xul
Comments 0 comments
Just a little code to make a window in XUL
11
Date Submitted Sun. Oct. 9th, 2005 8:12 PM
Revision 1
Coder mattrmiller
Tags Cookie | JavaScript | Set
Comments 0 comments
Set a Cookie
« Previous 1 2  ...  8 9 10 11 12 13 14 15 16 Next »