Have you ever wanted to turn off Internet Explorer's "auto-complete" feature for a specific form field? Well, there's a lesser known, IE-specific, attribute named "autocomplete" for the <input> tag which will disable the auto-complete drop down box from appearing. Why would you want to do that, well there's lots of reasons. Maybe your creating a site geared towards public computers that allow a user logon; in that case, you don't want user names appearing in the autocomplete box.
To disable the auto-complete feature, just add the "autocomplete" attribute to your form field tags with the value of "off". For example:
<input type="text" name="userId" autocomplete="off" />
Reasoning recently did a review of Apache's code and found that the defects per thousand lines of code were on par with commercial products in the same stage of development. Although the number of defects were slightly higher (by .02 per thousand lines of code,) Reasoning determined that the end result may turn out to be a better product due to the nature of open source projects—implying that bugs found are more likely to be addressed quickly by the public, since anyone has the ability to track down and repair the bugs.
"The open-source code seems to start at the same defect rate for early commercial code as well," Jeff Klagenberg, director of project management, said in an interview. "Over time, it can gain higher levels of quality. That appears to be because of the natural inspection process inherent in open source."
I hate to see blanket statements like this. I do think when an open source project has financial backing by a large company, that this probably holds true, but let's face it, there's only so much energy someone will put into a open source project before needing some kind of monetary return.
I posted a new article to PengoWorks.com today that shows a technique for running multiple onload events without altering your base source code. Here's a quote:
One of the most common things I run into while developing sites dependant on JavaScript is the need to have multiple operations run during <body>'s onload event. I think this is a problem most developers run into, since it's very common to develop a set of "shared border" templates that render the shell of your site and the body of your document is included via a server-side command.
Often you have the need to invoke some JavaScript during the onload event of every page. This might be to render a DHTML-based menu, or simply to initial some information about the page, regardless, you need this information to run on every page.
However, you often run into the case were you need to run some addition commands based upon the page that's being inserted. Most often this happens when I'm developing a page that has a form on it. There are a lot of ways to tackle this problem, but the tip I'm going to share with you is the one that I've found over the years to be the best solution. For a lack of a better term, I'll call this the "Auto-init()" method.
If you have any comments about the article, please post a comment!
Have you ever had the need to invoke an instance of a componet based upon it's relative path? I know I have, so I threw this little UDF together.
To invoke a component, you simply call the component() function using either the standard dot notation or you can specify either a relative or absolute path to the CFC. I tried to make the "type" argument somewhat intelligent and it'll probably work correctly 99% of the time for you, but if you want to be absolutely sure you get the expected behavior, specify the type argument for the function.
I wrote this CFMX-based UDF a while ago, and I thought I'd share it. One of my big gripes about the xslTransform() function in CFMX is that it doesn't support passing parameters to the transformation engine.
Passing parameters can be extremely useful, as it'll allow you to do some conditional operations on in your XSL sheets based upon values determined by the ColdFusion.
In a nutshell, this UDF accomplish this by parsing the XSL stylesheet and looking for instances of the <xsl:param> tag name attributes that match the key in the structure you passed in. Once it's looped through the entire "Params" structure, it'll use the modified XSL stylesheet to do the transformation. Basically, it just temporarily hard codes those values in the param for you.