JavaScript On countdown timer (minutes &a...

by seaofclouds, January 02, 2009 21:54

@some - real nice solution....

F55e8e113669f6ea7d1d99f38907ce54 Talk
function PrintHour(hour) {
   var o = hour + 5; 
   return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...

JavaScript On Writing a loop to create a ...

by dd, December 26, 2008 16:39
D2d66ecf0167dad4dda98a05cb6dee66 Talk
function PrintHour(hour) {
   var o = hour + 5; 
   return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...

JavaScript On Writing a loop to create a ...

by Garren, December 24, 2008 00:40

oops BusinessHour should be...

87592c76b8b913ea464a1546aeb011d5 Talk
function PrintHour(hour) {
   var o = hour + 5; 
   return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...

JavaScript On Writing a loop to create a ...

by Garren, December 24, 2008 00:37

Adam - nice.

87592c76b8b913ea464a1546aeb011d5 Talk

JavaScript On ImageFlow - something like ...

by Stephen, December 23, 2008 20:02

Do you think it would be po...

1c7b2db5b23ca735680eaee72ab5fd6b Talk
function BusinessHour(t) {
    this.inRange = function() {
        return t > 0 && t < 14;
...

JavaScript On Writing a loop to create a ...

by Adam, December 11, 2008 19:37

Just playin' around.

A8d3f35baafdaea851914b17dae9e1fc Talk
times = [
  null,
  '7:00AM ',
...

JavaScript On Writing a loop to create a ...

by Tien Dung, December 11, 2008 08:35 Star_fullStar_fullStar_fullStar_fullStar_full
5071c5b861341c0dcfcf6ac86327701f Talk
function countdown(remain,messages) {
	var
		notifier = document.getElementById("notifier"),
...

JavaScript On countdown timer (minutes &a...

by some, November 17, 2008 11:06 Star_fullStar_fullStar_fullStar_full

I like Tien Dungs approach ...

Ae5de8fa45f79815c64b98690088a48d Talk
x = new Array();
x[2] = 'something';
x[7] = 'somethingelse';
...

JavaScript On Get the last key

by SEO Services, November 08, 2008 01:42

Another thing you can do to...

64a1736c4d99161054707a2a1393223b Talk

JavaScript On Highlight Selected forms, S...

by openid.aol.com/forwardfootmedia, October 14, 2008 19:39

I like the naming of formDe...

Fbb264f64b4ce69bae04764280141faf Talk
FormDefault = {
    setHighlight: function(object) {
        var element = FormDefault.element(object);
...

JavaScript On Highlight Selected forms, S...

by Adam, October 14, 2008 19:12 Star_fullStar_fullStar_fullStar_full

Prototype version based on ...

A8d3f35baafdaea851914b17dae9e1fc Talk

JavaScript On Highlight Selected forms, S...

by John Sietsma, October 12, 2008 03:09 Star_fullStar_fullStar_fullStar_full

No really, I suppose just b...

37ce1520d319fa8095d05aa475951616 Talk

JavaScript On Highlight Selected forms, S...

by openid.aol.com/forwardfootmedia, October 11, 2008 20:41

29 lines over 90, Not bad. ...

Fbb264f64b4ce69bae04764280141faf Talk
$.fn.setHighlight = function() {
  return this.each( function() {
    $(this).removeClass('optional');
...

JavaScript On Highlight Selected forms, S...

by John Sietsma, October 11, 2008 04:51

I couldn't resist a JQuery ...

37ce1520d319fa8095d05aa475951616 Talk
loadURL(location.hash || "#news")

JavaScript On Small Javascript Code

by Adam, October 08, 2008 03:59 Star_fullStar_fullStar_fullStar_fullStar_full

No need to split up the loc...

A8d3f35baafdaea851914b17dae9e1fc Talk
function getAnchor(default) {
  default = default || 'news';
  return document.location.toString().split( '#' )[1] || default;
...

JavaScript On Small Javascript Code

by Tien Dung, October 06, 2008 22:23 Star_fullStar_fullStar_fullStar_fullStar_full

You can't do ||= in JavaScript

5071c5b861341c0dcfcf6ac86327701f Talk
Q("#toggler").click(function() {
        var mode = this.mode;
        this.mode = !mode;
...

JavaScript On Toggle "Check all / Un...

by Tien Dung, October 06, 2008 22:19 Star_fullStar_fullStar_fullStar_full

Use true/false instead of u...

5071c5b861341c0dcfcf6ac86327701f Talk
var getAnchor = function (default) {
  default ||= 'news';
  return document.location.toString().split( '#' )[1] || default;
...

JavaScript On Small Javascript Code

by chovy.myopenid.com, October 06, 2008 19:46

Some would say you should o...

035687df00d162cec025302373ebc076 Talk
var selectedAnchorOr = function(url, default) {
  var urlWithAnchor = url.match(/^.*(#.+)$/);
  if (urlWithAnchor !== null) {
...

JavaScript On Small Javascript Code

by Gabriele Lana, October 06, 2008 06:13

Not tested but should work....

3c2a50916630af4097799a1fd2b1ebce Talk
// Don't know why you need hash > 0 and page.length > 1
// In case you don't need those conditions
var page = document.location.toString().split("#")[1];
...

JavaScript On Small Javascript Code

by Tien Dung, October 06, 2008 04:21 Star_fullStar_fullStar_fullStar_full
5071c5b861341c0dcfcf6ac86327701f Talk
/*

var biz;
...

JavaScript On Small Javascript Code

by chovy.myopenid.com, October 06, 2008 02:05 Star_fullStar_fullStar_fullStar_full

Get position of "#" in the ...

035687df00d162cec025302373ebc076 Talk
var State = {
    validations: $H({
        "Unknown": function(index, value) { !boil[index] || !melt[index] },
...

JavaScript On Color elements by state of ...

by Adam, September 18, 2008 04:47

Using Prototype and taking ...

A8d3f35baafdaea851914b17dae9e1fc Talk
function state_classes(updateall) {
    var value = display.value * 1, tempcolor;
    var element, state, 
...

JavaScript On Color elements by state of ...

by Tien Dung, September 16, 2008 06:44

or using eval(..)

5071c5b861341c0dcfcf6ac86327701f Talk
function state_classes(updateall) {
    var value = display.value * 1, tempcolor;
    var element, state, states = ["Unknown", "Gas", "Liquid", "Solid"];
...

JavaScript On Color elements by state of ...

by Tien Dung, September 16, 2008 00:52
5071c5b861341c0dcfcf6ac86327701f Talk
Date.MONTH_NAMES = ["January", "February", "March", "April", "May",
 "June", "July", "August", "September", "October", "November", "December"];

...

JavaScript On Week Of Date

by Andrew Dupont, September 04, 2008 15:47

Right, OK. Tweaked again so...

Fede7405a0e4cd5722e0b85920a0728c Talk