|
|
|
สอบถามวิธีการส่งค่า id ครับ จะเอาค่า id จาก modal bootstrap ไป POST ใช้ต่อยังไง |
|
|
|
|
|
|
|
ขออธิบายตามรูปนะครับ ความต้องการคือจะส่ง id ไปประมวลผลที่ไฟล์ process.php ครับ
ตารางตรงนี้ ผมต้องการแก้ Budget
พอคลิกเพื่อแก้ไข จะให้พิมพ์บันทึกเพิ่มเติม และแก้ Budget ที่เลือก
พอกดบันทึก แล้วลอง echo ค่า id ไม่ถูกส่งมา
index.php
<?
include "../library/connect_db.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="tis-620">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Demo</title>
<!-- Bootstrap Core CSS -->
<link href="../bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap-multiselect.css" type="text/css"/>
<!-- MetisMenu CSS -->
<link href="../bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="../dist/css/sb-admin-2.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="../bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<!-- *************** head *********** -->
<?
// include "../pages/head.php";
?>
<!-- *************** head *********** -->
<!-- /.navbar-top-links -->
<!-- ---------------------------menu ------------ -->
<?
// include "../pages/menu.php";
?>
<!-- ---------------------------menu ------------ -->
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper" style="padding-top: 20px;">
<div class="row">
<div class="col-lg-12">
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-body">
<!-- /.panel -->
<div style="padding-top: 10px;">
<!-- div class="panel panel-default">
<div class="panel-heading" -->
<? echo "<div id=\"thanks\"></div>";?>
<!-- /div -->
<!-- /.panel-heading -->
<div class="panel-body" >
<div class="dataTable_wrapper" id="mydiv" >
<div id="printsection" >
<table class="table table-striped table-condensed table-bordered table-hover" id="dataTables-example" >
<thead class="alert alert-info">
<tr>
<th>#</th>
<th>CustomerID</th>
<th>Name</th>
<th>Email</th>
<th>CountryCode</th>
<th>Budget</th>
<th>Used</th>
</tr>
</thead>
<tbody>
<?
$no = 1;
$sql_equip = "SELECT * FROM customer";
$query_equip= Connect_DB($sql_equip);
while($rs_equip = mysql_fetch_array($query_equip)){
$CustomerID = $rs_equip["CustomerID"];
$Name = $rs_equip["Name"];
$Email = $rs_equip["Email"];
$CountryCode = $rs_equip["CountryCode"];
$Budget = $rs_equip["Budget"];
$Used = $rs_equip["Used"];
?>
<tr>
<td align="center" ><?=$no++;?></td>
<td align="center"><a data-toggle="modal" data-id="<?=$CustomerID;?>" data-name="<?=$Name;?>" href="#form-content" class="open-EditDialog btn btn-primary btn-xs"><?=$CustomerID;?></a></td>
<td><?=$Name;?></td>
<td><?=$Email;?></td>
<td><?=$CountryCode;?></td>
<td><?=$Budget;?></td>
<td><?=$Used;?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</form>
<div id="form-content" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h3>แก้ไขรายการ</h3>
</div>
<div class="modal-body">
<form class="contact" name="contact">
<div class="form-group">
<div class="row">
<div class="col-md-4">
<h4><label>ID</label> <span name="id" id="id" class="label label-success"></span> </h4>
</div>
<div class="col-md-4">
<h4><label>Name</label> <span name="name" id="name" class="label label-success"></span></h4>
</div>
<div class="col-md-4">
</div>
</div>
</div>
<div class="form-group">
<h4><label>บันทึกเพิ่มเติม</label></h4>
<textarea name="message" class="form-control" rows="3"></textarea>
</div>
<div class="form-group">
<h4><label>Budget</label></h4>
<select class="form-control" name="budget" id="budget">
<option value="10,000">10,000</option>
<option value="15,000">15,000</option>
<option value="30,000">30,000</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<input class="btn btn-success" type="submit" value="บันทึก" id="submit">
<a href="#" class="btn btn-default" data-dismiss="modal">ยกเลิก</a>
</div>
</div>
</div>
</div>
<!-- /div -->
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../bower_components/bootstrap/js/bootstrap-multiselect.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- DataTables JavaScript -->
<script src="../bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="../bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
<script src="../bower_components/datatables/media/js/dataTables.tableTools.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
<script language="javascript">
$(document).ready(function() {
$('#dataTables-example').DataTable({
responsive: true,
"bFilter": false
});
});
</script>
<script>
$(document).ready(function () {
$("input#submit").click(function(){
$.ajax({
type: "POST",
url: "process.php", //
data: $('form.contact').serialize(),
success: function(msg){
$("#thanks").html(msg)
$("#form-content").modal('hide');
// window.location.reload();
},
error: function(){
alert("failure");
}
});
});
});
</script>
<script>
$(document).on("click", ".open-EditDialog", function () {
var id = $(this).data('id');
var name = $(this).data('name');
$(".modal-body #id").html( id );
$(".modal-body #name").html( name );
});
</script>
</body>
</html>
process.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="tis-620">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
</head>
<?php
if (isset($_POST['budget'])) {
echo "ID = ".$_POST['id']."";
echo "<br>";
echo "Budget = ".$_POST['budget']."";
echo "<br>";
echo "Message = ".$_POST['message']."";
}else{
echo "ตัวแปรไม่มีค่า";
}
?>
</html>
Tag : PHP, MySQL, jQuery
|
|
|
|
|
|
Date :
2015-08-02 23:07:54 |
By :
giverplus |
View :
8576 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span name="id" id="id" class="label label-success"></span>
แก้เป็น
<input name="id" id="id" class="label label-success" readonly >
span ไม่ส่งค่า ไปกับ form ครับ
$(".modal-body #id").html( id );
แก้เป็น
$(".modal-body #id").val( id );
|
ประวัติการแก้ไข 2015-08-03 07:37:22
|
|
|
|
Date :
2015-08-03 07:36:08 |
By :
NewbiePHP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้แล้วครับ ขอบคุณมากเลยครับ
|
|
|
|
|
Date :
2015-08-03 08:45:05 |
By :
giverplus |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ช่วยหน่อยคะ คือ select ข้อมูลทั้งหมดออกจากตารางที่ต้องการแล้วสร้างปุ่มเพื่อจะกดให้ข้อมูลทั้งหมดโชว์ที่ popup
เมื่อกด popup ไม่ขึ้นค่าตาม id ที่เลือก
Code (PHP)
<!DOCTYPE html>
<html lang="en">
<head>
<?php //include("plugin.php"); ?>
<script language="JavaScript" type="text/javascript">
$(document).ready(function(){
$("a.delete").click(function(e){
if(!confirm('คุณจะลบข้อมูลหรือไม่?')){
e.preventDefault();
return false;
}
return true;
});
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ระบบจัดการฐานข้อมูล : การจัดการวัสดุ</title>
</head>
<body>
<?php
include ("sidebar.php")
?>
<?php
include("connect.php");
mysql_query("SET NAMES UTF8");
$db = "scsticker";
$result = mysql_select_db($db);
if(!$result){
die('Could not find database called material: '. mysql_error());
}
$test_id = "select MAX(SUBSTRING(mat_id,6)) as num from material ";
$tmp = mysql_query($test_id) or die (mysql_error()." Error Query [".$test_id."]");
$rows = mysql_fetch_array($tmp);
if($rows){
$num = $rows['num'];
if($num==Null){
$num = 0;
}
$test_id = $num+1;
if($test_id < 10){
$mat_id = "MAT000".$test_id;
}
elseif ($test_id < 100) {
$mat_id= "MAT00".$test_id;
}
elseif ($test_id < 1000) {
$mat_id = "MAT0".$test_id;
}
}
?>
<?php
if (isset($_POST['submit']))
{
$mat_id = mysql_real_escape_string(htmlspecialchars($_POST['mat_id']));
$mat_name = mysql_real_escape_string(htmlspecialchars($_POST['mat_name']));
$color_id = mysql_real_escape_string(htmlspecialchars($_POST['color_id']));
$brand_id =mysql_real_escape_string(htmlspecialchars($_POST['brand_id']));
// $mat_pic =mysql_real_escape_string(htmlspecialchars($_POST['mat_pic']));
$typemat_id =mysql_real_escape_string(htmlspecialchars($_POST['typemat_id']));
$mat_point_order =mysql_real_escape_string(htmlspecialchars($_POST['mat_point_order']));
$mat_amount =mysql_real_escape_string(htmlspecialchars($_POST['mat_amount']));
$unit_id =mysql_real_escape_string(htmlspecialchars($_POST['unit_id']));
$costprice =mysql_real_escape_string(htmlspecialchars($_POST['costprice']));
$mat_pic = $_FILES['mat_pic']['tmp_name'];
$mat_pic_name = $_FILES['mat_pic']['name'];
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$sq = "SELECT mat_id FROM material ORDER BY mat_id ";//DESC LIMIT 1
$result = mysql_query($sq)
or die(mysql_error());
while($row = mysql_fetch_array( $result ))
{
$sq2 = $mat_id;
}
if($mat_pic){
$arraypic = explode(".",$mat_pic_name);//แบ่งชื่อไฟล์กับนามสกุลออกจากกัน
$filename = $sq2;//ชื่อไฟล์
$filetype = $arraypic[1];//นามสกุลไฟล์
$filetyper = "jpg";
if($filetype=="jpg" || $filetype=="jpeg" || $filetype=="png"
|| $filetype=="gif"){
$newimage = $filename.".".$filetyper;//รวมชื่อไฟล์กับนามสกุลเข้าด้วยกัน
$mat_path='C:/xampp/htdocs/sc/img/'.$newimage; //หาวิธีเอา \ มาใช้
copy($mat_pic,"img/".$newimage); //โฟลเดอร์สำหรับเก็บรูป/ไฟล์รูป
}else {
echo "<h3>ERROR : ไม่สามารถ Upload รูปภาพ</h3>";
}
}
$query = mysql_query("SELECT COUNT(mat_name) FROM material WHERE mat_name = '". $mat_name ."'");
$row2 = mysql_fetch_array($query);
// echo $row2[0] ;
if ($row2[0] > 0) {
$message = "ข้อมูลซ้ำซ้อน";
echo "<script type='text/javascript'>alert('$message');</script>";
echo '<script>location = "material.php"</script>';
}
else if($row2[0]==0)
{
$message = "เพิ่มข้อมูลสำเร็จ";
$sql = "insert into `scsticker`.`material` (`mat_id`, `mat_name`, `color_id`, `brand_id`, `mat_pic`, `typemat_id`, `mat_point_order`, `mat_amount`, `unit_id`, `costprice`)
values ('".$mat_id."', '".$mat_name."', '".$color_id."', '".$brand_id."', '".$mat_path."', '".$typemat_id."', '".$mat_point_order."', '".$mat_amount."', '".$unit_id."', '".$costprice."')";
// echo $sql ;
mysql_query($sql) or die(mysql_error());
echo '<script>location = "material.php"</script>';
}
}
?>
<section id="main-content"> <!-- อย่าลบเลย -->
<section class="wrapper"> <!-- อย่าลบเลย -->
<!--overview start-->
<div class="row">
<div class="col-lg-12">
<h3 class="page-header"><i class="fa fa-laptop"></i> ข้อมูลวัสดุ</h3>
<div class="row">
<form action="material.php" method="post" id="form" enctype="multipart/form-data">
<div class="col-sm-2">รหัสวัสดุ</div>
<div class="col-sm-3"><input class="form-control" style="width:200px;" id="mat_id" name="mat_id" type="text" readonly="readonly" value="<?=$mat_id?>"></div>
<div class="col-sm-2">ชื่อวัสดุ<font color="red"> *</font></div>
<div class="col-sm-5"><input class="form-control" id="mat_name" name="mat_name" style="width:200px;"></div>
<div class="col-sm-2" >สี<font color="red"> *</font></div>
<div class="col-sm-3" ><select name="color_id" class="form-control" style="width:200px;">
<?php
$result = mysql_query("SELECT * FROM color ORDER BY color_name") or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<option value="<?php echo $row["color_id"]?>"><?php echo $row["color_name"]?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2" >ยี่ห้อ<font color="red"> *</font></div>
<div class="col-sm-5" ><select name="brand_id" class="form-control" style="width:200px;">
<?php
$result = mysql_query("SELECT * FROM brand ORDER BY brand_name") or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<option value="<?php echo $row["brand_id"]?>"><?php echo $row["brand_name"]?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2" >ประเภทวัสดุ<font color="red"> *</font></div>
<div class="col-sm-3" ><select name="typemat_id" class="form-control" style="width:200px;">
<?php
$result = mysql_query("SELECT * FROM type_material ") or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<option value="<?php echo $row["typemat_id"]?>"><?php echo $row["typemat_name"]?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2" >จุดสั่งซื้อ<font color="red"> *</font></div>
<div class="col-sm-5" ><input class="form-control" id="mat_point_order" name="mat_point_order" style="width:200px;" ></div>
<div class="col-sm-2" >จำนวน<font color="red"> *</font></div>
<div class="col-sm-3" ><input class="form-control" id="mat_amount" name="mat_amount" style="width:200px;"></div>
<div class="col-sm-2" >หน่วยนับ<font color="red"> *</font></div>
<div class="col-sm-5" ><select name="unit_id" class="form-control" style="width:200px;">
<?php
$result = mysql_query("SELECT * FROM unit WHERE typeun_name = 'สินค้า'") or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<option value="<?php echo $row["unit_id"]?>"><?php echo $row["unit_name"]?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2">ราคาต้นทุน (บาท)<font color="red"> *</font></div>
<div class="col-sm-10"><input class="form-control" id="costprice" name="costprice" style="width:200px;"></div>
<div class="col-sm-2" >รูปภาพ<font color="red"> *</font></div>
<div class="col-sm-10" display:inline><input name="mat_pic" type="file" size="35"/></div>
<div class="col-sm-6"><button type="submit" class="btn btn-success " value="submit" name="submit" style= "width: 80px; float: right;">เพิ่มข้อมูล</button></div>
<div class="col-sm-6"><button type="reset" class="btn btn-danger " style="width: 80px; float: left;">ล้างข้อมูล</button></div>
</form>
</div>
<br>
<div class="panel panel-default">
<div class="panel-body">
<h4>แสดงข้อมูลวัสดุ</h4>
<form action="material_search.php" class="navbar-form navbar-left" role="search" >
<table>
<tr>
<td><input name="txtKeyword" type="text" id="txtKeyword" class="form-control" placeholder="Search" style="width: 646px;"></td>
<td><button type="submit" class="btn btn-default">ค้นหา</button></td>
</tr>
</table>
</form>
<!-- Table -->
<!-- Query -->
<?php
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$result = mysql_query("SELECT count(*) FROM material ORDER BY mat_id")
or die(mysql_error());
$total_rec=mysql_result($result,0,0);
$p_size=20;
$total_page=(int)($total_rec/$p_size);
if(($total_rec % $p_size)!=0){ //ถ้าข้อมูลมีเศษให้ทำการบวกเพิ่มจำนวนหน้าอีก 1
$total_page++;
}
if(empty($_GET['page'])){
$page=1;
$start=0;
}else{
$page=$_GET['page'];
$start=$p_size*($page-1);
}
$begin = ($page*$p_size)-$p_size;
$offset = ($page*$p_size)/$page;
$query = "select mat_id , mat_name , color_name , brand_name , typemat_name , mat_amount , costprice , mat_point_order , unit_name from material , color , brand , type_material , unit WHERE material.color_id = color.color_id AND material.brand_id = brand.brand_id AND material.typemat_id = type_material.typemat_id AND material.unit_id = unit.unit_id order by mat_name ASC LIMIT $offset OFFSET $begin";
$result = mysql_query($query);
echo "<table class='table table-striped table-bordered'>";
echo "<tr>
<th><div align='center'>รหัสวัสดุ</div></th>
<th><div align='center'>รหัสวัสดุ</div></th>
<th><div align='left'>ชื่อวัสดุ</div></th>
<th><div align='left'>ประเภทวัสดุ</div></th>
<th><div align='center'>รายละเอียด</div></th>
<th><div align='center'>การจัดการ</div></th>
</tr>";
$i=1;
if($page > 1)
{
$x = ($p_size*($page-1)) + 1;
}
while($row = mysql_fetch_array( $result ))
{
$matids=$row[0];
echo "<tr>";
echo "<td>".$i++."</td>";
echo '<td align="center"><font color="#663300">' . $row['mat_id'] . '</font></td>';
echo '<td align="left"><font color="#663300">' . $row['mat_name'] . '</font></td>';
echo '<td align="left"><font color="#663300">' . $row['typemat_name'] . '</font></td>';
echo '<td align="center"><font color="#663300"> ';
?>
<table>
<tr>
<td>
<a data-toggle="modal" data-id="<?php echo $row['mat_id'];?>" data-name="<?php echo $row['mat_name'];?>" href="#form-content" class="open-EditDialog btn btn-primary btn-xs"><?php echo $row['mat_id'];?></a><!-- </td> -->
<div id="form-content" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">รายละเอียดเพิ่มเติม <?php echo $matids;?></h4>
</div>
<div class="modal-body">
<table>
<tr>
<th></th>
<th>รูปภาพวัสดุ</th>
<th>รหัสวัสดุ</th>
<th>ชื่อวัสดุ</th>
<th>สี</th>
<th>ยี่ห้อ</th>
<th>ประเภทวัสดุ</th>
<th>ราคาต้นทุน (บาท)</th>
<th>จำนวน</th>
<th>จุดสั่งซื้อ</th>
<th>หน่วยนับ</th>
</tr>
<tr>
<?php
echo "<td></td>";
echo '<td ><font color="#663300"><img src="../sc/img/'.$row['mat_id'].'.jpg" class="magnify" style="width:150px;height:150px;"></font></td>';
echo '<td align="center"><font color="#663300">' . $row['mat_id'] . '</font></td>';
echo '<td align="left"><font color="#663300">' . $row['mat_name'] . '</font></td>';
echo '<td align="left"><font color="#663300">' . $row['color_name'] . '</font></td>';
echo '<td ><font color="#663300">' . $row['brand_name'] . '</font></td>';
echo '<td ><font color="#663300">' . $row['typemat_name'] . '</font></td>';
echo '<td align="right"><font color="#663300">' . $row['costprice'] . '</font></td>';
echo '<td align="right"><font color="#663300">' . $row['mat_amount'] . '</font></td>';
echo '<td align="right"><font color="#663300">' . $row['mat_point_order'] . '</font></td>';
echo '<td align="center"><font color="#663300">' . $row['unit_name'] . '</font></td>';
echo '<td align="center"><font color="#663300">';
?>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
<?php
echo '</font></td>';
echo '<td><center>
<font color="#663300">
<a href="material_edit.php?id=' . $row['mat_id'] . '&mat_name='.$row['mat_name'].'&color_id='.$row['color_name']. '&brand_id='.$row['brand_name'].'&typemat_id='.$row['typemat_name'].'&mat_point_order='.$row['mat_point_order'].'&mat_amount='.$row['mat_amount'].'&unit_id='.$row['unit_name'].'&costprice='.$row['costprice'].'">
<span class="glyphicon glyphicon-edit" type="submit" formaction="material_edit.php"></a>
</font>
<font color="#663300">
<a href="material_delete.php?id=' . $row['mat_id'] . '" class="delete"><span class="glyphicon glyphicon-trash"></a>
</font>
</td>';
echo "</tr>";
}
echo "</table>";
?>
</div>
</div>
</div>
</div>
</section><!-- ปิด sectionลองบน -->
</section><!-- ปิด sectionบนสุด -->
<ul class="pagination pull-right">
<?php
if($total_rec>1){
$back = $total_rec-1;
echo "<li><a href=".$_SERVER['PHP_SELF']."?page=".$back.">«</a></li>";
}
else
echo "<li><a>«</a></li>";
for($i=1;$i<=$total_page;$i++){ //สร้าง Link เพื่อให้ผู้ใช้งานเลือกชมหน้าข้อมูล
echo "<li><a href=".$_SERVER['PHP_SELF']."?page=".$i.">".$i."</a></li>";
}
if($total_rec<$total_page){
$next = $total_rec +1;
echo "<li><a href=".$_SERVER['PHP_SELF']."?page=".$next.">»</a></li>";
}
else
echo "<li><a>»</a></li>";
?>
</ul>
</div>
</div>
</div>
</div>
</div>
<script language="javascript">
$(document).ready(function() {
$('#dataTables-example').DataTable({
responsive: true,
"bFilter": false
});
});
</script>
<script>
$(document).ready(function () {
$("input#submit").click(function(){
$.ajax({
type: "POST",
url: "process.php",
data: $('form.contact').serialize(),
success: function(msg){
$("#thanks").html(msg)
$("#form-content").modal('hide');
},
error: function(){
alert("failure");
}
});
});
});
</script>
<script>
$(document).on("click", ".open-EditDialog", function () {
var id = $(this).data('id');
var name = $(this).data('name');
$(".modal-body #id").val( id );
$(".modal-body #name").val( name );
});
</script>
</body>
</html>
|
|
|
|
|
Date :
2016-07-22 22:21:47 |
By :
POMP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|