Category Archives: Client side

TextboxList 0.4 is out, with new features:

  • check option, which can allow you to specify a function to filter out new boxes that do not meet a requirement
  • encode now receives the complete values, not only the id or string of the bit. This gives you full control of what you want to send to the server.
  • Autocomplete now works with on-demand suggestions. As easy as this:

    new TextboxList('form_tags_input_4', {unique: true, plugins: {autocomplete: {
    	minLength: 3,
    	queryRemote: true,
    	remote: {url: 'autocomplete2.php'}
    }}});
    

And some bugfixes:

  • Fixed missing index when unique: false and autocomplete were used, which resulted in an error
  • Fixed problems with items with id 0, which incorrectly evaluated as false.

Head to the demo to see the new autocomplete in action, and as usual, report any bugs you might encounter.
Update: 0.5 is out already, which fixes a bug with the traditional use of Autocomplete. Sorry for the trouble!

No matter how much we all hate IE6, we never seem to agree on what’s the best way to finally get rid of it. Web designers and developers alike have realized that investing too much time and effort in fixing its quirks is not viable from a business perspective, but they still want to reach that audience.

This ambivalence is what still drives people, like myself, to keep writing about the infamous browser.

Read more

Moo TextboxList 0.3 changes:

  • HTML for bits not showing properly fixed
  • highlightSelector not working (due to a typo) fixed
  • GrowingInput missing pad function added (only affected if you customized growing.mini option)
  • Improved clicking the whole widget behavior
  • Other tiny enhancements / cleanup

Secondly, in the best interest of the JavaScript community, I’ve ported TextboxList to jQuery. The API changes slightly due to the different OOP approach, but all the functionality is intact. Head to jQuery TextboxList project page for more.

Update: 0.2 is out for jQuery. Bugs in autocompleter and IE have been addressed.

How it works

A regular expression looks for text outside HTML tags. It uses a callback function to perform replacements to simulate native lookahead support.

When is this sort of replacement suitable ?

  • Remote HTML responses (ajax) highlighting
  • Autocompleters suggestion highlighting
  • User-typed HTML, WYSIWIGs, etc.

Generally speaking, the only downside of this method, since it deals with the innerHTML, is that all attached events and properties are lost when the replacement is performed.

Read more