Skip to content

Latest commit

 

History

History
83 lines (66 loc) · 1.89 KB

README.md

File metadata and controls

83 lines (66 loc) · 1.89 KB

jquery.ajax-combobox

A jQuery plugin for creating a text box it can auto-complete and pull-down-select.

Demo

http://www.usamimi.info/~sutara/ajax-combobox/

Usage

HTML
<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">
jQuery
$('#box01').ajaxComboBox('foo.php');

Note

Database

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);
//++++++++++++++++++++++++++++++++++++++++++++++++++++
?>
button_img

Change the value of button_imgoption to your environment.

$('#foo').ajaxComboBox(
	'bar-directory/jquery.ajax-combobox.php',
	{
		button_img: 'bar-directory/btn.png'
	}
);

Extensions

Forked

jquery.suggest 1.1

jquery.caretpos.js 0.1

Author

Yuusaku Miyazaki (宮崎 雄策)

License

MIT License