Skip to main content

Posts

Showing posts from June, 2004

Adventures in JScript: Episode Seven - Attached Behaviors, Part 2

Introduction: Last time I scratched out a frenzied look at the basics of Attached Behaviors. Based upon a couple of comments, I'm going to dive into them a little deeper and spend a little time on the actual code used in my now infamous a_datebox.htc . If you'd like to see the requirements for this little monster, take a gander at Episode 6 in "Our Requirements". Lest anyone think that I'm a card-carrying expert on all things Behavior, I need to provide the following disclaimer: Most of this "knowledge" was acquired by reading "Windows Web Scripting Developer's Guide" by Dan Heflin & Todd Ney. I've mentioned it before and I'll mention it again, it's about the only book I've found on Behaviors and these guys did a commendable job describing the technology. It's out of print, but I picked it up on eBay for like $5.... As I've mentioned a couple of times, Behaviors are nothing new in the JScript...

Adventures in JScript: Episode Six - Attached Behaviors

Preamble: Wow, it's been a long time since we last met...that dreaded work/personal life took over and suddenly scratching out AF() articles fell way down on the priority list.... Let's get back to it! Introduction: The previous two AIJS episodes focused on the standard IE behaviors. While they're great and all, we're all coders right? We like to build things with our bare hands! The boys and girls in Redmond didn't let us down...we have Attached Behaviors to satisfy this thirst. Back when IE 5 came out, these were called DHTML Behaviors, then in a moment of supreme revision, they renamed them Attached when they intro'd the other Behavior, the Element Behavior (more about those in the next episode). Remember, for the most comprehensive (and it ain't much) coverage for behaviors, I look to MSDN . Attached Behaviors let us write a small (or large) amount of code (JScript naturally -- but OK, OK, it could be VBScript) and attach it to a ...