Archive for December, 2010

SelectList Available on GitHub

Thursday, December 30th, 2010

With the last update to selectList, I made the plugin code available on GitHub. A few people have requested this, so there it is — go and grab it, fork it, or do whatever you can imagine with it.

My other projects will probably follow — however, I’m not migrating them to GitHub, I’m just using it as another means of making my code available to the world. Everything will still be hosted here on this website, and being the cloud-phobe that I am, I don’t expect this to change anytime soon.

SelectList 0.4

Tuesday, December 21st, 2010

SelectList 0.4 has just been released. This is a major update which introduces a different (better) approach to how the original multiple selection element is handled and how the plugin stores the selected options.

In the previous versions, the multiple select element was transformed into a single selection drop-down list by stripping off its multiple attribute, so there was no multiple select in the document anymore, and the selected options had to be stored in a series of type="hidden" input elements. However, this turned out to cause significant problems with obtaining the selected values with the core jQuery .val() method, and with serialization through .serialize().

I modified the code so that the original multiple selection element stays hidden in the document and continues to serve as a container for the selected options. This way the .val() and .serialize() methods are unaffected and can be used in the conventional manner.

This solution also has a few drawbacks (for example, it makes validation a bit more complicated), but it’s much easier to work around them than dealing with the quirks of the previous method.

The new version works with jQuery 1.3.2 up to 1.4.4. Oh, and the refactoring also happened to have made it smaller than the previous version.

  • Archives

  • Categories

  • Meta

  • Latest Tweets


    Warning: Illegal string offset 'last_access' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 334

    Warning: Illegal string offset 'time_limit' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 334

    Warning: Illegal string offset 'last_access' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 336

    Warning: Illegal string offset 'twitter_api' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 234

    Warning: Illegal string offset 'user_token' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 262

    Warning: Illegal string offset 'user_secret' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 263

    Warning: Illegal string offset 'consumer_key' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 264

    Warning: Illegal string offset 'consumer_secret' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 265

    Warning: Illegal string offset 'twitter_username' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 270

    Warning: Illegal string offset 'show_retweets' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 272

    Warning: Illegal string offset 'exclude_replies' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 275

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 282

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 350

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 351
    Twitter outputted an error:
    .
    Warning: Illegal string offset 'time_format' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 484
  • Follow odyniec on Twitter