zhangkcd / jquery.ajax-combobox

A jQuery plugin for creating a text box it can autocomplete and pulldown-select.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/

JSDoc

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

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 "./lib/jquery.ajax-combobox.php".
("./lib/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

About

A jQuery plugin for creating a text box it can autocomplete and pulldown-select.


Languages

Language:HTML 68.4%Language:JavaScript 25.1%Language:CSS 4.1%Language:PHP 2.3%