Coldfusion Datefield Not Opening Calendar Window
I was having an unusual problem with a coldfusion form this morning, where my cfinput fields of type="datefield" would show the tiny calendar icon, but wouldn't open the popup window. I couldn't find any discussion of this issue anywhere, but I kept looking at code until the obvious jumped out, as it always does. The site I was working on was heavily ajaxed, and it seems I had lost track of form names. The form that was exhibiting abnormal behavior had the same name as another form on the page (ultimately). Changing the form name fixed the issue.

No Comments Yet    Add a Comment

Focusing on Your First Form Field
I've had mixed results with scripts that attempted to set the focus on individual form fields, but this one has worked well for me in a number of situations. First, place this script right before </head>:

<script type="text/javascript">
// This will focus first non-hidden text or textarea field on the first form.
function focus_first ()
{
    var form = document.forms[0];
    if (form != null && form.elements[0] != null)
    {
        for (var i = 0; i < form.elements.length; ++i)
        {
            var field = form.elements[i];
            if (field.type!="hidden" && (field.type=="text" || field.type=="textarea"))
            {
                field.focus();
                break;
            }
        }
    }
}
</script>

Then, make sure your <body> tag includes onload="focus_first()", like:

<body onload="focus_first()">


No Comments Yet    Add a Comment

Planet 10
Here's a link to a band I was in back in the day:

http://toneandwave.blogspot.com/2011/07/planet-10-loves-dream-12-1985.html




No Comments Yet    Add a Comment

A Tree Named Bob
When Carol passed, the family planted a tree at Jason's house. When Bob passed, the family decided to plant a tree in a pot, to sit at Miles and Linda's house, since we rent. It's a Lime tree, named Bob.



No Comments Yet    Add a Comment

Archives | Show All