Friday Quick Tip: HTMLEditFormat for JavaScript

Posted By : todd sharp Posted At : July 24, 2009 10:43 PM Posted In: jQuery, JavaScript

4

I just came across a handy little function that emulates ColdFusion's HTMLEditFormat() function. It's quite simple really, but it worked perfectly since I wanted to display some HTML as text (instead of rendering it). Here it is should you ever finding yourself with a need to do the same:

function htmlEditFormat(h){
    return h.split("&").join("& amp;").split( "<").join("& lt;").split(">").join("& gt;");
}

Note: to use the function remove the space after each & - I had to put that in to prevent my blog from rendering them.

I should point also point out that Chris Jordan has a complete package of JavaScript functions that emulate ColdFusion built in functions on RIAForge called CFJS. The package is built to work with jQuery (FTW). I haven't tried it out yet, but from what I hear it comes in handy.

Check Out The New SlideSix

Posted By : todd sharp Posted At : June 29, 2009 9:04 AM Posted In: jQuery, JavaScript, CSS, ColdFusion, SlideSix

3

I'm happy to announce that the new and improved SlideSix is now live. This new look and feel is a complete overhaul compared to the original design of the site. The new design uses a lot of gray, blue and black in order to make the site more closely resemble the Flex pieces that were already in place. There are also a lot of rounded corners to take the edge off of the deep colors so they hopefully don't overwhelm. Thanks to some feedback there is also a shiny new logo. Here's the new home page:

presentation view

More after the jump:

Enabling GZip Encoding On IIS7

Posted By : todd sharp Posted At : June 10, 2009 9:30 AM Posted In: JavaScript, CSS, ColdFusion

6

I've spent a bit of time lately trying to figure out how to enable GZip compression on IIS7. I don't have much experience with GZip, but it doesn't take a rocket scientist to figure out that a smaller file results in a faster page download which always ends in a happier user.

More Dynamic JavaScript With ColdFusion

Posted By : todd sharp Posted At : February 17, 2009 1:21 PM Posted In: JavaScript, ColdFusion

0

Earlier today I blogged about serving dynamic JavaScript with ColdFusion. The demo was a bit boring, so I decided to make it a tiny bit more dynamic. In this example we'll be passing a URL variable to the CFM template that serves up the JavaScript and we'll use that variable to conditionally include other JavaScript files which will actually output some content to the page.

Serving Dynamic JavaScript With ColdFusion

Posted By : todd sharp Posted At : February 17, 2009 9:42 AM Posted In: JavaScript, ColdFusion

8

I know the title doesn't sound terribly exciting, but bear with me, the topic is actually pretty cool. A friend asked me this morning if there was a way to 'import' a JavaScript file (in this case it was jQuery) from another JavaScript file.

It is an interesting question for sure. Your first thought is probably the <script> tag, but the <script> tag is an HTML tag. If you're serving a pure JS file you can't just slap a <script> tag in and go on your merry way.

Progressively Enhanced Transcripts With jQuery

Posted By : todd sharp Posted At : January 15, 2009 10:08 AM Posted In: jQuery, Ajax, Usability, JavaScript, SlideSix

3

I quietly added a new feature to SlideSix earlier this week which now extracts the text contents of each slide and displays that text as a transcript on the view page of a presentation. The reason behind this enhancement is to dramatically increase the search engine visibility of your presentations since search engines will be basically indexing the content of each of your slides.

Progressive Enhancement With ColdFusion 8 Ajax

Posted By : todd sharp Posted At : March 17, 2008 1:00 PM Posted In: Ajax, JavaScript, ColdFusion

10

I've been heavy into some research lately, trying to become more familiar with some advanced concepts. Part of such research has been to learn more about Progressive Enhancement. I wouldn't exactly call myself an expert on the topic, but essentially it's a shift in mindsight from what I've gotten used to with Ajax development over the last year.

Practical Ajax - Enhancing The User Experience

Posted By : todd sharp Posted At : January 16, 2008 12:20 PM Posted In: Ajax, Usability, OO, JavaScript, ColdFusion

1

Ajax can be a double-edged sword of sorts. If properly done our users should really have little or no clue that any 'magic' has happened. If overdone (or implemented needlessly - a phenomenon I like to call 'Because I Can...' or 'BIC') our users can be overwhelmed, and/or confused. One of the end goals of implementing an Ajax solution is to give our users an enhanced experience with our application - or at the very least keep them from being annoyed by the experience.

cfImageCropper Updated

Posted By : todd sharp Posted At : September 4, 2007 10:40 PM Posted In: Ajax, cfImageCropper, JavaScript, ColdFusion

6

I've finally put together some proper documentation for my cfImageCropper custom tag. You can get the latest release here which includes the documentation and a few minor code tweaks. If you're not familiar with the tag see this post

I'm also cooking up some other very cool client side image stuff in the labs, so stay tuned.

Ajax Paging Through Records On Scroll

Posted By : todd sharp Posted At : August 21, 2007 3:32 PM Posted In: Ajax, JavaScript, ColdFusion

5

I've always thought one of the cooler features on dzone was how they paged through the entries as you scroll down the list. This seems a ton more user friendly then the traditional 'next/previous' links.

I decided to see how easy it would be to recreate this functionality using ColdFusion 8 and as usual the answer was 'pretty easy'. There is a bit of JavaScript, but it's nothing too difficult to wrap your head around.