01.
<html>
02.
<head>
03.
<script type=
"text/javascript"
src=
"auto/autocomplete.js"
></script>
04.
<link rel=
"stylesheet"
href=
"auto/autocomplete.css"
type=
"text/css"
/>
05.
</head>
06.
<body>
07.
<form name=
"frmMain"
action=
""
method=
"POST"
>
08.
<input name=
"show_arti_topic"
type=
"text"
id=
"show_arti_topic"
/>
09.
<input name=
"g_code"
type=
"hidden"
id=
"g_code"
value=
""
/>
10.
<script language=
"JavaScript"
>
11.
function
AutoSubmit()
12.
{
13.
document.frmMain.submit();
14.
}
15.
</script>
16.
</form>
17.
<script type=
"text/javascript"
>
18.
function
make_autocom(autoObj,showObj){
19.
var
mkAutoObj=autoObj;
20.
var
mkSerValObj=showObj;
21.
new
Autocomplete(mkAutoObj,
function
() {
22.
this.setValue =
function
(id) {
23.
document.getElementById(mkSerValObj).value = id;
24.
}
25.
if
( this.isModified )
26.
this.setValue(
""
);
27.
if
( this.value.length < 1 && this.isNotClick )
28.
return
;
29.
return
"gdata.php?q=TM|"
+encodeURIComponent(this.value);
30.
});
31.
}
32.
make_autocom(
"show_arti_topic"
,
"g_code"
);
33.
</script>
34.
<?
echo
$g_code
; ?>
35.
</body>
36.
</html>