A jQuery plugin for creating a text box it can auto-complete and pull-down-select.
http://www.usamimi.info/~sutara/ajax-combobox/
<head>
<link rel="stylesheet" href="css/jquery.ajax-combobox.css">
<script src="js/jquery.ajax-combobox.7.2.1.js"></script>
</head>
<body>
<input type="text" id="box01">
$('#box01').ajaxComboBox('foo.php');
Change the value to connect Database in "./dist/jquery.ajax-combobox.php".
("./dist/jquery.ajax-combobox.php"の文頭のデータベースの接続設定を、お使いの環境に合わせて変更して下さい。)
<?php
//++++++++++++++++++++++++++++++++++++++++++++++++++++
//#### You MUST change this value. ####
$mysql = array(
'dsn' => 'mysql:host=localhost;dbname=acbox;charset=utf8',
'username' => 'root',
'password' => ''
);
$sqlite = array(
'dsn' => 'sqlite:../sample/sample.sqlite3',
'username' => '',
'password' => ''
);
new AjaxComboBox($sqlite);
//++++++++++++++++++++++++++++++++++++++++++++++++++++
?>
Change the value of button_img
option to your environment.
$('#foo').ajaxComboBox(
'bar-directory/jquery.ajax-combobox.php',
{
button_img: 'bar-directory/btn.png'
}
);
- Author: Peter Vulgaris
- http://www.vulgarisoverip.com/2007/08/06/jquerysuggest-11/
- Author: tubureteru
- http://d.hatena.ne.jp/tubureteru/20110101/
Yuusaku Miyazaki (宮崎 雄策)
- Mail: [email protected]
- Blog