Attractive Auto Complete Text Box in Asp.Net using Jquery
First of all the following code inside your <head> tag ::
<link rel="stylesheet" href="jquery-ui.css">
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script>
$(function () {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$("#tags").autocomplete({
source: availableTags
});
});
</script>
And then add the following code inside your body tag anywhere you required ::
<div class="ui-widget">
<label for="tags">Search Product Here: </label>
<input id="tags"/>
</div>
Download links for the .Js and .css files::
http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css
http://code.jquery.com/jquery-1.9.1.js
http://code.jquery.com/ui/1.10.4/jquery-ui.js
<link rel="stylesheet" href="jquery-ui.css">
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script>
$(function () {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$("#tags").autocomplete({
source: availableTags
});
});
</script>
And then add the following code inside your body tag anywhere you required ::
<div class="ui-widget">
<label for="tags">Search Product Here: </label>
<input id="tags"/>
</div>
Download links for the .Js and .css files::
http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css
http://code.jquery.com/jquery-1.9.1.js
http://code.jquery.com/ui/1.10.4/jquery-ui.js
vbbbg
ReplyDelete