<script language="javascript"> $(function() { $("#inputBox").autoSuggest({ ajaxFilePath : "server.php", ajaxParams : "dummydata=dummyData", autoFill : false, width : "auto", opacity : "0.9", limit : "10", idHolder : "id-holder", match : "contains" }); }); </script>
Option | Description |
---|---|
ajaxFilePath | This option will hold file path which will return options to ajax call.Default value is NULL. |
ajaxParams | If you want to send custom parameters to ajax file then you can pass all that parameters through this variable in single querystring. Default value is NULL. |
autoFill | If you want to fill the value under mouse/keyboard in the textfield then set this variable to true. Default value is false. |
iwidth | iWidth options holds desired width of suggestion list. Possible values could be 1) auto - Automatically adjusts with input fields width. 2) Any integer (Ex : 100px) - user defined Default value is auto. |
opacity | Opacity of the suggestion list. It can be anything from 0.0 to 1.0 |
ilimit | iLimit option holds number of results (items) you want to show in the suggestion list. |
idHolder | If you want to save id of selected item and want to pass it to next page for further processing then 'idHolder' is the thing you are loking for. enter input field name in this option. and autoSuggest plugin will automatically store id of the selected item in supplied field. |
match | This is additional option seen in only few plugins. now with this option you can tell autosuggest plugin which search criteria to use. 1) starts - Lists all the values that starts with entered text. 2) ends - Lists all the values that ends with entered text. 3) contains - Lists all the values that contains with entered text. |