02.
<script type=
"text/javascript"
>
03.
$(document).ready(
function
(){
04.
05.
$(
"#Drg_Barcode"
).change(
function
(){
06.
$.ajax({
07.
url:
"return_shop_font.php"
,
08.
type:
"POST"
,
09.
data:
'Drg_Barcode='
+$(
"#Drg_Barcode"
).val()
10.
})
11.
.success(
function
(result) {
12.
13.
var
obj = jQuery.parseJSON(result);
14.
15.
if
(obj ==
''
)
16.
{
17.
$(
'input[type=text]'
).val(
''
);
18.
}
19.
else
20.
{
21.
$.each(obj,
function
(key, inval) {
22.
23.
$(
"#Drg_Barcode"
).val(inval[
"Drg_Barcode"
]);
24.
$(
"#Drg_Id"
).val(inval[
"Drg_Id"
]);
25.
$(
"#Drg_Id2"
).val(inval[
"Drg_Id"
]);
26.
$(
"#Drg_Name"
).val(inval[
"Drg_Name"
]);
27.
$(
"#Comm_Name"
).val(inval[
"Comm_Name"
]);
28.
$(
"#Udrg_Rw"
).val(inval[
"Udrg_Rw"
]);
29.
$(
"#Unt_Name"
).val(inval[
"Unt_Name"
]);
30.
$(
"#Price_Sale"
).val(inval[
"Price_Sale"
]);
31.
$(
"#Udrg_Instr"
).val(inval[
"Udrg_Instr"
]);
32.
33.
});
34.
}
35.
36.
});
37.
38.
});
39.
});
40.
41.
</script>
42.
43.
<form name=
"frmMain"
method=
"post"
action=
"<?=$_SERVER["
PHP_SELF
"];?>"
>
44.
<input type=
"hidden"
name=
"hdnCmd"
value=
""
>
45.
46.
47.
<td><div align=
"right"
>บาร์โค้ด :</td>
48.
<td width=
"190"
colspan=
"4"
><div align=
"right"
>
49.
<input type=
"text"
value=
"<? echo $Drg_Barcode ?>"
size=
"68"
name=
"Drg_Barcode"
id=
"Drg_Barcode"
autofocus />
50.
</div></td>