Spartan Java

Tag: css

AJAX autocomplete

by ricardoz on Apr.17, 2008, under JavaScript, Tips, Web related

Using a nice AJAX auto completable input box is much nicer (for the user) than a combo box with 100 options. If you use jQuery, you may use a quite easy yet powerful plug-in called jquery.autocomplete (original, eh?). Grab it at http://www.pengoworks.com/workshop/jquery/autocomplete.htm.
(continue reading…)

3 Comments :, , , , , , , , more...

Long fields breaking your HTML?

by ricardoz on Apr.06, 2008, under Tips, Web related

I guess in more than one time you needed to display some text in a space where it not always will fit. For example graphical designers love to lay out lists and tables and purposely forget about how long each field will really be ;)

A solution I like is to display always a fixed number of characters and add the full text as a title (mouse over display). A really easy way to do this is using the substring function from the JSTL functions library, for example:

1
2
3
<span title="${myBean.myProp}">
${fn:substring(myBean.myProp,0,25)}
</span>
Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...