Click here to Skip to main content
15,896,410 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
can you please tell me what is make auto suggested text field . i download this code but not able understand understand this. can you please paste the code of autosuggested text field with .js andd .css file.
http://jqueryui.com/demos/autocomplete/[^]
Posted
Updated 29-Sep-12 3:02am
v2
Comments
fjdiewornncalwe 29-Sep-12 9:06am    
My vote of 1: You have the jqueryui link that contains all the samples you could want. Do you magically expect that we will come up with samples that you will understand when you can't understand the ones at that site? The autocomplete samples on that site are very clear, concise and exactly what you need. If you don't understand them perhaps you are just not quite ready to do that yet. The one thing I remember from when I started out as a developer is that biting off something I couldn't chew before I was ready to caused immense frustration and slowed down my progress immensely. Take baby steps to learn and build your confidence. Cheers.
ravi1989h 29-Sep-12 9:12am    
<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>



<div class="demo">

<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>

</div><!-- End demo -->



<div class="demo-description" style="display: none; ">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
</div><!-- End demo-description -->
ravi1989h 29-Sep-12 9:14am    
$( "#tags" ).autocomplete({ //where is autocomplete? and availableTags
source: availableTags
});
ravi1989h 29-Sep-12 9:17am    
Sir can you please write code so that i can understand..:(

1 solution

I totally agree with Marcus on this. Even though you have everything on hand, you fail to try to make it working. Not good. Please put in more effort from next time.

For this once, have a look at this article with sample that should be more than enough: JQuery UI autocomplete textbox with database in asp.net[^]

Try out!
 
Share this answer
 
Comments
ravi1989h 29-Sep-12 9:33am    
not getting any thing .......:( actually i needed for this for mobile technology(Phonegap)no use of asp.net code
ravi1989h 29-Sep-12 9:35am    
<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>



<div class="demo">

<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>

</div><!-- End demo -->

please run this program i am not able to run this demo
ravi1989h 29-Sep-12 9:51am    
why this is not working..?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Ravi needs SOAP</title>
<link href="jquery-ui-1.8.24.custom.css" rel="stylesheet" type="text/css" />
<style type="text/css">
div.h { display: none; }
div.s { display: block; margin: 10px; }
</style>

<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(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>
</head>
<body>

<div class="demo">

<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>

</div><!-- End demo -->



<div class="demo-description" style="display: none; ">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
</div><!-- End demo-description -->

</body>
</html>
ravi1989h 29-Sep-12 10:07am    
Error
Uncaught TypeError: Object [object Object] has no method 'autocomplete'
Sandeep Mewara 29-Sep-12 10:46am    
Your autocomplete jQuery file is not referenced. Refer that properly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900