Current Filter:
Category: Extensions
Date Range: 10/7/2002
(clear filters)

Monday, October 7, 2002

Gonna make Dan proud...

Dan's gonna be so proud...I actually wrote my first VBScript function late Saturday night. I spent most of my day on Sunday with my friend for her birthday, but my mind was on getting home to work on converting the function (which I'd already made into a working Server Behavior) into a Server Format. What's the difference you ask? Well first let me tell you what my function does. Dreamweaver offers Date/Time Formats through the Format column of the Bindings panel. None of them output the time in a 12 hour clock format without seconds. For example, look here at my blog. See that the time for this entry is 5:39:27 AM? What if I wanted to remove the seconds so it shows 5:39 AM? I'd use my new function ;-). I originally made it a Server Behavior, but the problem with that is, rather than convert the selectiom. DW assumes I have yet to enter the field on the page. Second problem is that the Server Behaviors panel is cluttered with things enough as it is, and really shouldn't have something that is just done for the sake of formatting. So, I set out to build a Server Format. Now that I've done it once, I think I'm unstoppable... I just need to read up on how to package a Server Format because it requires adding to the Formats.xml file, and I'm all set. Next, I'll see if I can tackle the same concept for ColdFusion, and I'll release both when they're ready. I needed to apply this code to at least 10 pages and I wasn't about to handcode it each time or use Snippets. So "necessity is the mother of extensions", also known as my need to be lazy ;-). As Laurie put it to me on MSN, "laziness is the mother of extensions". Stay tuned for an announcement for the release of "Seconds Stripper" some time (much) later today...

Posted by ~Angela | Comments (0) | Add Comment | Permalink