My article in .NET / update to Dropdown
Remember I blogged a few months back that I'd been approached to write for .NET? Well my article is in the latest (September) issue, so perhaps you've seen it.
It's a beginner's guide to tackling regular expressions - one of the most avoided and feared areas of programming for elementary-intermediate-level developers.
There's an annoying typo; the * modifier, of course, matches zero or more characters, not one or more. D'oh. I had meant the + modifier, which does match one or more characters.
In other news, following a recent update to my jQuery Dropdown script (which allowed it to be used as a form field, not just as a navigational tool), there's been another update.
In the comments on the script page, Michael Eaton requested that it be possible to include icons in the 'options'. This is now possible!
Head over here to download, get usage info or view a demo.
post a commentUsing Dropdown as a fancy form field
Not before time, I've updated my Dropdown plugin for jQuery. It now supports a new 'form field' mode, meaning you can use Dropdown as a fancy alternative to a element, rather than just as a navigation tool.
As you'd expect of a real , it submits a value to the server once the form is submitted.
It does this by creating a hidden field, whose value is updated every time an 'option' in the dropdown is selected. The name of this hidden field (i.e. the name of the value that should be sent to the server on submit) is denoted a parameter at set-up. Here's an example of using Dropdown in form field mode:
1new Dropdown({
2 mode: 'form',
3 data: [{val: 1, text: 'dog'}, {val: 2, text: 'cat'}, {val: 3, text: 'platipus'}],
4 startText: 'Select an option...',
5 fieldName: 'animal'
6});
Head over here to download, get usage info or view a demo.
post a comment