CPAN-Testers-WWW-Reports

 view release on metacpan or  search on metacpan

vhost/html/js/OpenThought.js  view on Meta::CPAN

    }
}

// Takes a fieldname as an argument, and gives that field the focus
this.Focus = function(element)
{
    var object  = this.FindElement(element)

    // If no object is found with the name "element", then either they typed in
    // wrong, or it's an anchor.  There's no way to know for sure, so let's
    // guess the latter.  This should make debugging fun.

    if( !object ) {
        if ( document.anchors[element] ) {
            this.log.info("Jumping to anchor tag ['" + element + "'].");
            location.hash = "#" + element;
        }
        else {
            this.log.error("Can't seem to find the element '" + element + "', unable to focus.");
        }
    }



( run in 0.881 second using v1.01-cache-2.11-cpan-748bfb374f4 )