jquery.ajax-combobox
Version:
jQuery plugin to create a text box which can auto-complete and pull-down-select.
34 lines • 923 B
HTML
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Get instance: jquery.ajax-combobox</title>
<link rel="stylesheet" href="../../dist/css/jquery.ajax-combobox.css">
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../../dist/js/jquery.ajax-combobox.min.js"></script>
<script>
$(function() {
var $instance = $('#foo').ajaxComboBox(
'-----',
{
db_table: '-----',
instance: true
}
);
$instance.each(function() {
this.option.source = '../../dist/php/jquery.ajax-combobox.php';
this.option.db_table = 'nation';
});
});
</script>
</head>
<body>
<h1>Get instance: jquery.ajax-combobox</h1>
<form action="send.php" method="post">
<label for="foo">Nation:</label><br>
<input id="foo" name="foo" type="text">
<p><button type="submit">Send</button></p>
</form>
</body>
</html>