User login

JQuery

Combining first and last name form fields to make a suggested preferred display name with JQuery

Names are one the annoyances of the web development world. We want to have everything be neat, to have our brilliant content management system (Drupal) take the raw data (a site participant's name) and display it as it makes sense in different contexts.

Sometimes it comes down to asking people what they prefer to be called.

Using jQuery to auto select text in a field

So you've custom themed a search bar into your brand spanking new custom theme using my handy tutorial covering that topic (http://www.agaricdesign.com/note/theme-search-form-drupal-6)

Load new content via AJAX and change the URL

Agaric wanted to know how to have a photo album where pictures would load when selected, without re-loading the rest of the page. The goal is to have the chosen picture load (with JQuery effects and any other coolness without a full page refresh) but to also have the URL in the address bar updates so people have a unique link back to the image.

Facebook does this, and the next time I was catching up on my friends' new album additions at 4 a.m. on a Sunday morning, I had to view source and see what was going on.

What looks like the key javascript code is copied below.

For usability, Drupal should focus on the first relevant form field

For a basic, but nice, usability improvement Drupal, for all pages where a form is the center of attention, the first form field that people should type in should have the keyboard focus given to it.

Here's a method for doing it with JQuery: http://www.gerd-riesselmann.net/development/focus-first-form-field-with-jquery

Syndicate content