By Dina Hess
| Title: | Truncating Text to the Nearest Whole Word |
| Date: | 05/03/04 (6 Posts) |
| Summary: | Looking for a way to truncate a title that is longer than 150 characters without breaking up a word? Try the FullLeft() UDF available at cflib.org. |
| Title: | Cannot Use UDF Inside Custom Tags? |
| Date: | 05/03/04 (19 Posts) |
| Summary: | In CF5, if your custom tag needs an end tag, simply placing a UDF within <CFIF thisTag.executionmode is "start"> will generate an error. To work around, place the UDF in a separate file, CFINCLUDE it at the top of the calling page within <CFIF not isCustomFunction("myFunction")>, and then set the function to a global scope. |
| Title: | OnSubmit on Dropdown |
| Date: | 05/03/04 (4 Posts) |
| Summary: | How do you set up a SELECT dropdown to automatically submit a form when the user chooses an option? |
|
<SELECT onchange="this.form.submit();"...>
|
|
| Title: | Closing Custom Tags |
| Date: | 05/03/04 (30 Posts) |
| Summary: | To make your custom tags safe for nesting with CFMODULE syntax, always include an end tag and use the following code to prevent the tag from executing twice: |
|
<!--- This tag does nothing in end mode --->
<cfif ThisTag.ExecutionMode eq "END"> <cfexit method="EXITTAG"> </cfif> |
|
| Related: | CFMODULE Does Not Expose Data? |