1

I'm trying to make use of the results attribute of HTML5 <input type="search"> tags on Chrome, which should make for a "recent searches" funcionality.

I cannot manage to make Chrome show a list of recent searches, not even on this demo page. When you input a few searches, and then click the arrow next to the magnifying glass, a list of recent searches should appear. Somehow, nothing happens when I click that arrow.

I'm using Chrome 16 on Windows, if that matters (the screenshots on the demo page seem to be taken on a Mac, where it apparently does work).

What am I missing? Is there possibly a some setting in Chrome that I may have turned off accidentally?

2
  • It does say "Chrome 6-13" in the compatibility table...
    – BoltClock
    Dec 18, 2011 at 15:57
  • @BoltClock: Good catch! Though, I can't get it to work on Chromium 10 either. It behaves exactly the same - nothing happens when clicking the arrow.
    – pimvdb
    Dec 18, 2011 at 16:07

2 Answers 2

2
+50

Seems like chrome doesn't fully support that attribute.

How about autocomplete... http://www.w3.org/TR/html-markup/input.search.html#input.search.attrs.autocomplete

There is more info regarding chrome support for the results attribute in the chromium bug/issue list. http://code.google.com/p/chromium/issues/detail?id=77779
http://code.google.com/p/chromium/issues/detail?id=17

1
0

Add a "name" (or "id") attribute and it should work in Chrome. You'll need a <form> element around it with a valid action="..." attribute as well.

<input type='search' results='5' name='something'>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.