| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<!-- |
| 4 |
Copyright 2010 The Closure Library Authors. All Rights Reserved. |
| 5 |
|
| 6 |
Use of this source code is governed by the Apache License, Version 2.0. |
| 7 |
See the COPYING file for details. |
| 8 |
--> |
| 9 |
<head> |
| 10 |
<title>goog.ui.ac</title> |
| 11 |
<script src="../base.js"></script> |
| 12 |
<script> |
| 13 |
goog.require('goog.ui.ac'); |
| 14 |
</script> |
| 15 |
<link rel="stylesheet" href="css/demo.css"> |
| 16 |
<link rel="stylesheet" href="../css/autocomplete.css"> |
| 17 |
<style> |
| 18 |
small { |
| 19 |
color: #999; |
| 20 |
font-size: x-small; |
| 21 |
} |
| 22 |
</style> |
| 23 |
</head> |
| 24 |
<body> |
| 25 |
<h1>goog.ui.ac</h1> |
| 26 |
<p> |
| 27 |
Tom Cruise Film Finder:<br> |
| 28 |
<input id="txtInput1" style="width:500px" /> <button>Go</button> |
| 29 |
</p> |
| 30 |
<p> |
| 31 |
Multi-Tom Cruise Film Finder:<br> |
| 32 |
<textarea id="txtInput2" style="width:500px"></textarea> |
| 33 |
<button>Go</button><br> |
| 34 |
<small>Data from Google Sets! Not my personal DVD collection!!!</small> |
| 35 |
</p> |
| 36 |
<script type="text/javascript"> |
| 37 |
var tcMovies = [ |
| 38 |
"Mission Impossible", "Top Gun","Jerry McGuire","Rain Man", |
| 39 |
"Days of Thunder", "Risky Business","Interview With The Vampire", |
| 40 |
"Eyes Wide Shut","Far And Away", "Jerry Maguire","The Firm","Cocktail", |
| 41 |
"A Few Good Men","Legend","Taps", "The Outsiders","Losin' It", |
| 42 |
"Endless Love","The Color Of Money", "All The Right Moves", |
| 43 |
"Minority Report","Magnolia","Mission Impossible 2", |
| 44 |
"Mission Impossible 3","Vanilla Sky","Ghost Soldiers","Few Good Men A", |
| 45 |
"Color of Money The","Firm The","Mission Impossible II","Outsiders The", |
| 46 |
"Young Guns","Top Gun DVD","Days of Thunder DVD","Cocktail", |
| 47 |
"Mission Impossible DVD","Fallen Angels Vol 1","Don't Look at Me", |
| 48 |
"Young Guns uncredited"]; |
| 49 |
|
| 50 |
var ac1 = goog.ui.ac.createSimpleAutoComplete( |
| 51 |
tcMovies, document.getElementById('txtInput1'), false); |
| 52 |
var ac2 = goog.ui.ac.createSimpleAutoComplete( |
| 53 |
tcMovies, document.getElementById('txtInput2'), true); |
| 54 |
</script> |
| 55 |
</body> |
| 56 |
</html> |