Standard no more!

Karl said: You should change your blog search field to use the new <input type=”search” /> attribute in Safari

So I did. If you are using Safari 1.3 or later the search field should look like this:

search.jpg

It will store your 10 most recent searches (accessible by clicking on the little disclosure triangle beside the magnifying glass). Nothing to fear for other browser users though, it’ll degrade nicely to a plain textfield on any browser that doesn’t recognize the type="search" attribute.

Karl also says:

You can add it to a WOTextField in WebObjects too, just add these bindings:

  • autosave = “autosave-name”; // the name under which to save the previous searches in defaults
  • results = 10; // the number of previous searches to save
  • type = “search”; // the input type (required)
  • placeholder = “my placeholder”; // the grey text in the box when it’s empty and doesn’t have focus.

3 thoughts on “Standard no more!

Comments are closed.