|
|
|
อยากให้เคอเซอร์ที่ช่องข้อความเมื่อกดแสดงให้ไปอยู่ในช่องจำนวนเงิน |
|
|
|
|
|
|
|
เวลากดค้นหาให้มันเด้งไปที่กรอกค่าปรับได้เลยครับ
Code (PHP)
<script src="../js/ui/jquery.ui.widget.js"></script>
<script src="../js/ui/jquery.ui.mouse.js"></script>
<script src="../js/ui/jquery.ui.sortable.js"></script>
<script src="../js/ui/jquery.ui.tabs.js"></script>
<script src="../js/ui/jquery.ui.menu.js"></script>
<script src="../js/ui/jquery.ui.autocomplete.js"></script>
<script src="../js/ui/jquery.ui.position.js"></script>
<script src="../js/ui/jquery.ui.datepicker.js"></script>
<script src="../js/ui/i18n/jquery.ui.datepicker-th.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#slidingDiv").hide();
$("#show_hide").show();
$('#show_hide').click(function(){
$("#slidingDiv").slideToggle();
});
var tabs = $( "#tabs" ).tabs();
tabs.find( ".ui-tabs-nav" ).sortable({
axis: "x",
stop: function() {
tabs.tabs( "refresh" );
}
});
$( "#showfault2" ).autocomplete({
minLength: 1,
source: "../modules/payaqua/card_result_fault.php",
focus: function( event, ui ) {
$( "#showfault2" ).val( ui.item.label );
return false;
},
})
.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
.append('<a><div class="list_item_container" title="'+item.name+'"><span class="label">' + item.name + '</span></div></a>')
.appendTo( ul );
};
});
</script>
<div class="aqua_hbar"><img src="../media/icons/nav/book_2.png" width="32" height="32">ลงกระทำความผิด</div>
<?php
$member_data=$getdata->my_sql_query(NULL,"member","member_key='".addslashes($_GET['key'])."'");
if(@addslashes($_POST['show_data'])){
$faultdata = $getdata->my_sql_query(NULL,"fault","fault_code='".addslashes($_REQUEST['fault_code'])."'");
}
if(@addslashes($_POST['register_fault'])){
if(@addslashes($faultdata['fault_status'] != 0)){
$display_alert = '<div class="alert_box red"><img src="../media/icons/set/white/alert2.png" width="32" height="32">ผู้ข้อหานี้ยังไม่ได้ถูกเปิดใช้งาน กรุณาตรวจสอบและลองใหม่อีกครั้ง !</div>';
} else if(addslashes($_POST['h_fault_key']) != NULL){
$regis_key = md5(addslashes($_POST['h_fault_key']).time("now"));
$getdata->my_sql_insert("fault_register","regis_key='".$regis_key."',fault_key='".addslashes($_POST['h_fault_key'])."',member_key='".$member_data->member_key."',regis_price='".addslashes($_POST['fault_price'])."',payment_status='0'");
$display_alert = '<div class="alert_box green"><img src="../media/icons/set/color/right1.png" width="32" height="32">บันทึกกระทำความผิด สำเร็จ!</div>';
echo '<script>alert("บันทึกกระทำความผิด สำเร็จ!")</script>';
echo "<script>window.location='?p=payaqua&member_code=$member_data->member_code'</script>";
}else{
$display_alert = '<div class="alert_box red"><img src="../media/icons/set/white/notification.png" width="32" height="32">ข้อมูลไม่ถูกต้อง กรุณาตรวจสอบใหม่อีกครั้ง !</div>';
}
}
?>
<?php echo @$faultdata->fault_status;?>
<div class="field_invisible">
<?php echo @$display_alert;?>
<form id="form1" name="form1" method="post">
<table width="100%" border="0">
<tr>
<td width="50%"><fieldset class="field_std3" >
<legend>ข้อมูลสมาชิกวิน ฯ </legend>
<table width="100%" border="0">
<tr>
<td width="11%" rowspan="2" align="center"><img src="../resource/members/images/<?php echo @$member_data->member_photo;?>" height="50" alt="" id="image_border"/></td>
<td width="23%" align="right">เลขบัตรประชาชน :</td>
<td width="66%"> <?php echo @$member_data->member_code;?></td>
</tr>
<tr>
<td height="21" align="right">ชื่อ-สกุล :</td>
<td> <?php echo @$member_data->member_prefix.$member_data->member_name." ".$member_data->member_lastname;?></td>
</tr>
</table></fieldset></td>
<td width="50%"><fieldset class="field_std3" >
<legend>ค้นหากระทำความผิด</legend><table width="100%" border="0">
<tr>
<td width="50%" height="29" align="center">
<label for="fault_on">ข้อหาหรือมาตรา :</label>
<input type="text" name="fault_code" class="aqua_textfield" id="showfault2" autofocus autocomplete="off" value="<?php echo @addslashes($_GET['fault_code']);?>">
<input type="submit" name="show_data" class="button green" value="แสดงข้อมูล">
</select></td>
</tr>
<tr>
<td width="50%"> </td>
</tr>
</table>
</fieldset>
</tr>
<tr>
<td colspan="2"><?php
if(@addslashes($_POST['show_data'])){
?>
<fieldset class="field_std3" >
<legend>รายละเอียดความผิด
</legend><table width="100%" border="0">
<tr>
<td width="28%" align="right">ID </td>
<td width="18%">
<input name="fault_code" type="text" disabled id="aqua_textfield" value="<?php echo @$faultdata->fault_code;?>" readonly>
<input type="hidden" name="h_fault_key" id="h_fault_key" value="<?php echo @$faultdata->fault_key;?>"></td>
<td width="15%" align="right">ข้อหา</td>
<td width="39%"><input name="fault_name" type="text" disabled id="aqua_textfield2" value="<?php echo @$faultdata->fault_name;?>" readonly></td>
</tr>
<tr>
<td align="right">มาตรา</td>
<td colspan="3">
<textarea name="fault_name_description" disabled readonly id="aqua_textarea"><?php echo @$faultdata->fault_name_description;?></textarea></td>
</tr>
<tr>
<td align="right">พระราชบัญญัติ</td>
<td colspan="3">
<input name="fault_price" type="text" disabled id="aqua_textfield" value="<?php echo @$faultdata->fault_act;?>" readonly>
</tr>
<tr>
<td align="right">ค่าปรับ</td>
<td colspan="3">
<input type="text" name="fault_price" id="aqua_textfield" show_value value="<?php echo @$faultdata->fault_price;?>"></td>
</tr>
<tr>
<td> </td>
<td colspan="3"><input type="submit" name="register_fault" class="button green" value="บันทึกลงระบบ"></td>
</tr>
</table>
</fieldset><?php
}
?></td>
</tr>
</table>
</form>
</div>
Tag : PHP, Appserv
|
|
|
|
|
|
Date :
2019-06-06 10:04:16 |
By :
Error 404 |
View :
677 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (JavaScript)
$('#idปุ่มค้นหา').on('click', function() {
$('#ช่องinput').focus();
});
https://api.jquery.com/focus/
|
|
|
|
|
Date :
2019-06-06 10:17:32 |
By :
mr.v |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|