รบกวนการใช้ epoch_classes.js หน่อยครับ เมื่อวางบนฟอร์มที่ทำการออกแบบไว้คลิกแล้วปฏิทินไม่ขึ้น แต่ถ้าเอาเฉพาะ Code ปฏิทินแยกมาอีกฟอร์มคลิกแล้วขึ้น
มือใหม่ครับ ของรบกวนผู้รู้ช่วยตอบหน่อยครับ
ตอนนี้ติดมาก คือผมเรียกใช้ epoch_classes.js
โดยเมื่อคลิกที่ textbox แล้วจะปรากฏปฏิทินให้เลือก แต่มันไม่ยอมขึ้นครับ ไม่มี Error บอกด้วยครับ ไม่ทราบว่าต้องแก้ยังไง
ผมได้ทำตัวอักษรสี่แดงไว้ครับ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<title>:: Add ข้อมูลประวัติรับราชการ ::</title>
<?php
include "dbconfig.php";
conndb();
?>
<style type="text/css">
<!--
.style8 {font-size: 12px}
.style10 {
font-size: 12px;
font-family: Tahoma, "Times New Roman", Verdana;
color: #333333;
}
.style12 {
font-family: Tahoma, "Times New Roman", Verdana;
font-size: 12px;
font-weight: bold;
color: #315C6F;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
a {
font-family: Tahoma, Times New Roman, Verdana;
font-size: 12px;
color: #FFFFFF;
}
.style14 {font-size: 12px; font-family: Georgia, "Times New Roman", Times, serif; }
-->
</style>
[font=Verdana]<link rel="stylesheet" type="text/css" href="epoch_styles.css" />
<script type="text/javascript" src="epoch_classes.js"></script>
<script type="text/javascript">
<!--
var bas_cal,dp_cal,ms_cal;
window.onload = function () {
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
};[/font]
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function check_number() {
key=event.keyCode;
if (key != 13 && (key < 48) || (key > 57)) {
event.returnValue = false;
alert("ต้องเป็นตัวเลขเท่านั้น... \nกรุณาตรวจสอบข้อมูลของท่านอีกครั้ง...");
}
}
-->
</script>
</head>
<body onLoad="MM_preloadImages('image/Back_11.gif')">
<div align="center">
<table width="706">
<tr>
<td width="700"><img src="image/hea.jpg" width="700" height="255"></td>
</tr>
<tr>
<td><table width="700">
<tr>
<td width="143" height="95" valign="top"><div align="center"><a href="persontab_detail.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','image/Back_11.gif',1)"><img src="image/Back_10.gif" name="Image2" width="143" height="22" border="0"></a>
<p> </p>
</div></td>
<td width="547" valign="top" bgcolor="#E2EEF3"><div align="center">
<table width="553">
<tr>
<td width="547" height="95" valign="top"><div align="center">
<table width="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#82B3C8">
<tr>
<td height="25"><div align="center"><span class="style12">ข้อมูลประวัติรับราชการ</span></div></td>
</tr>
</table>
<form action="persontab_add_function.php" method="get" enctype="multipart/form-data" name="form1">
<div align="left">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#CBDFE2">
<td width="21" bgcolor="#ECF3F4"> </td>
<td width="192" bgcolor="#ECF3F4"><div align="right"><span class="style10">เลขบัตรประจำตัวประชาชน</span></div></td>
<td width="14" bgcolor="#ECF3F4"> </td>
<td width="273" bgcolor="#ECF3F4"><input name="pID_P" type="text" id="pID_P" size="13" maxlength="13" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">เลขบัตรประจำตัวข้าราชการ</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pID_A" type="text" id="pID_A" size="13" maxlength="13" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#ECF3F4"> </td>
<td bgcolor="#ECF3F4"><div align="right"><span class="style10">เลขประจำตัวผู้เสียภาษ</span><span class="style8">ี</span></div></td>
<td bgcolor="#ECF3F4"> </td>
<td bgcolor="#ECF3F4"><input name="pID_T" type="text" id="pID_T" size="13" maxlength="10" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right" class="style10"> เลขที่ฌาปนกิจ</div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#82B3C8"><input name="pID_D" type="text" id="pID_D" size="13" maxlength="10" onKeyPress="check_number()"></td>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">ชื่อ</span></div></td>
<td> </td>
<td><input name="pFNAME2" type="text" id="pFNAME2"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">นามสกุล</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#82B3C8"><input name="pLNAME" type="text" id="pLNAME"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">เพศ</span></div></td>
<td> </td>
<td><span class="style8">
<select name="pGender" size="1">
<?
$strSQL = "SELECT * FROM GENDER_T where is_enable=1 order by GENDER_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["GENDER_ID"];?>" selected><?=$objResuut["GENDER_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> ศาสนา</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pReligion" size="1">
<?
$strSQL = "SELECT * FROM religion_t where is_enable=1 order by religion_id ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["RELIGION_ID"];?>" selected><?=$objResuut["RELIGION_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">กำเนิด</span></div></td>
<td> </td>
<td><span class="style14">
<select name="pOrigin" size="1">
<?
$strSQL = "SELECT * FROM origin_t where is_enable=1 order by origin_id ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["ORIGIN_ID"];?>" selected><?=$objResuut["ORIGIN_FNAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> เหล่า</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pCate_L" size="1">
<?
$strSQL = "SELECT * FROM CATE_T where is_enable=1 order by CATE_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["CATE_ID"];?>" selected><?=$objResuut["CATE_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">คำสั่งบรรจุครั้งแรก</span></div></td>
<td> </td>
<td><span class="style8">
<input id="popup_container" type="text" />
</span>
<div></div> </td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> วัน เดือน ปีที่บรรจุครั้งแรก</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<input name="pDateOccoupy" type="text" id="pDateOccoupy" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right" class="style10"><span class="style8">ประเภทกำลังพล</span></div></td>
<td> </td>
<td><span class="style8">
<select name="pCate_P" size="1">
<?
$strSQL = "SELECT * FROM CATE_P_T where is_enable=1 order by CATE_P_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["CATE_P_ID"];?>" selected><?=$objResuut["CATE_P_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">สถานภาพสมรส</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pMarry" size="1">
<?
$strSQL = "SELECT * FROM MARRY_T where is_enable=1 order by MARRY_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["MARRY_ID"];?>" selected><?=$objResuut["MARRY_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">วันเดือนปีเกิด</span></div></td>
<td> </td>
<td><span class="style8">
<input name="pBirthday" type="text" id="pBirthday" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> วันเดือนปีที่นับอายุราชการ</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<input name="pDateREG" type="text" id="pDateREG" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">วันเดือนปีที่ขึ้นทะเบียน</span></div></td>
<td> </td>
<td><span class="style8">
<input name="pDateAGE" type="text" id="pDateAGE" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">บ้านเลขท</span><span class="style8">ี่</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pNohome" type="text" id="pNohome" size="10" maxlength="10"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">หมู่ที่</span></div></td>
<td> </td>
<td><input name="pNomoo" type="text" id="pNomoo" onKeyPress="check_number()" size="5" maxlength="5"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">ถนน</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pRoad" type="text" id="pRoad"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">ซอย</span></div></td>
<td> </td>
<td><input name="pSoi" type="text" id="pSoi"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">แขวง/ตำบล</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pDistrict" type="text" id="pDistrict"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">เขต/อำเภอ</span></div></td>
<td> </td>
<td><input name="pBorder" type="text" id="pBorder"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">จังหวัด</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6">
<select name="pPrecinct" size="1">
<?
$strSQL = "SELECT * FROM PRECINCT_T where is_enable=1 order by PRECINCT_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["PRECINCT_ID"];?>" selected><?=$objResuut["PRECINCT_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">รหัสไปรษณีย</span><span class="style8">์</span></div></td>
<td> </td>
<td><input name="pZipcode" type="text" id="pZipcode" onKeyPress="check_number()" size="10" maxlength="5"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">โทรศัพท์บ้าน</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pPhone1" type="text" id="pPhone1" size="10" maxlength="10" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10"> โทรศัพท์มือถือ</span></div></td>
<td> </td>
<td><input name="pPhone2" type="text" id="pPhone2" size="10" maxlength="10" onKeyPress="check_number()"> </td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right">
<p class="style8"> </p>
<p class="style8">
<input type="submit" name="Submit" value="บันทึก">
</p>
</div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><p class="style8"> </p>
<p class="style8">
<input type="reset" name="Reset" value="ยกเลิก">
</p></td>
</tr>
</table>
</div>
</form>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="52"><div align="center"></div></td>
</tr>
</table>
</div>
</body>
</html>Tag : PHP
Date :
2010-08-17 11:06:11
By :
mixer98
View :
1119
Reply :
9
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
ลองเอาตัวหนา ออกครับ มันหาไม่เจอมันเลย error ถ้ายังไงเปิดด้วย firefox แล้ว ctrl + shift + j เดี๋ยวเห็นว่าอะไร error
Date :
2010-08-17 11:15:05
By :
PlaKriM
มาที ความฮา นำหน้าเลยอิๆ
Date :
2010-08-17 11:50:13
By :
peterxp
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
ลองเอาออกแล้วครับ เงียบเหมือนเดิมเลยครับ ???
Date :
2010-08-17 12:35:12
By :
mixer98
ผมบอกให้ลองเอาตัวหนาออกนะครับ ไม่ใช่เอาออกหมด
Date :
2010-08-17 13:56:54
By :
PlaKriM
ลองดูนะครับผมแค่ลองเอาโค๊ตของผมเพิ่มไปในส่วนของวันที่ครับ
Code (PHP)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<title>:: Add ข้อมูลประวัติรับราชการ ::</title>
<?php
include "dbconfig.php";
conndb();
?>
<style type="text/css">
<!--
.style8 {font-size: 12px}
.style10 {
font-size: 12px;
font-family: Tahoma, "Times New Roman", Verdana;
color: #333333;
}
.style12 {
font-family: Tahoma, "Times New Roman", Verdana;
font-size: 12px;
font-weight: bold;
color: #315C6F;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
a {
font-family: Tahoma, Times New Roman, Verdana;
font-size: 12px;
color: #FFFFFF;
}
.style14 {font-size: 12px; font-family: Georgia, "Times New Roman", Times, serif; }
-->
</style>
<link rel="stylesheet" type="text/css" href="epoch_styles.css" />
<script type="text/javascript" src="epoch_classes.js"></script>
<script type="text/javascript">
<!--
var bas_cal,dp_cal,ms_cal;
window.onload = function () {
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
};
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function check_number() {
key=event.keyCode;
if (key != 13 && (key < 48) || (key > 57)) {
event.returnValue = false;
alert("ต้องเป็นตัวเลขเท่านั้น... \nกรุณาตรวจสอบข้อมูลของท่านอีกครั้ง...");
}
}
-->
</script>
<script language="JavaScript">
<!--
var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var days = new Array("S", "M", "T", "W", "T", "F", "S");
today = new getToday();
var element_id;
function getDays(month, year)
{
// Test for leap year when February is selected.
if (1 == month)
return ((0 == year % 4) && (0 != (year % 100))) ||
(0 == year % 400) ? 29 : 28;
else
return daysInMonth[month];
}
function getToday()
{
// Generate today's date.
this.now = new Date();
this.year = this.now.getFullYear() ; // Returned year XXXX
this.month = this.now.getMonth();
this.day = this.now.getDate();
}
function newCalendar()
{
var parseYear = parseInt(document.all.year [document.all.year.selectedIndex].text);
var newCal = new Date(parseYear , document.all.month.selectedIndex, 1);
var day = -1;
var startDay = newCal.getDay();
var daily = 0;
today = new getToday(); // 1st call
if ((today.year == newCal.getFullYear() ) && (today.month == newCal.getMonth()))
day = today.day;
// Cache the calendar table's tBody section, dayList.
var tableCal = document.all.calendar.tBodies.dayList;
var intDaysInMonth =
getDays(newCal.getMonth(), newCal.getFullYear() );
for (var intWeek = 0; intWeek < tableCal.rows.length; intWeek++)
for (var intDay = 0;
intDay < tableCal.rows[intWeek].cells.length;
intDay++)
{
var cell = tableCal.rows[intWeek].cells[intDay];
// Start counting days.
if ((intDay == startDay) && (0 == daily))
daily = 1;
// Highlight the current day.
cell.style.color = (day == daily) ? "red" : "";
if(day == daily)
{
document.all.todayday.innerText= "Today: " + day + "/" +
(newCal.getMonth()+1) + "/" + newCal.getFullYear() ;
}
// Output the day number into the cell.
if ((daily > 0) && (daily <= intDaysInMonth))
cell.innerText = daily++;
else
cell.innerText = "";
}
}
function getTodayDay()
{
document.all[element_id].value = today.day + "/" + (today.month+1) +
"/" + today.year;
//document.all.calendar.style.visibility="hidden";
document.all.calendar.style.display="none";
document.all.year.selectedIndex =100;
document.all.month.selectedIndex = today.month;
}
function getDate()
{
// This code executes when the user clicks on a day
// in the calendar.
if ("TD" == event.srcElement.tagName)
// Test whether day is valid.
if ("" != event.srcElement.innerText)
{
var mn = document.all.month.selectedIndex+1;
var Year = document.all.year [document.all.year.selectedIndex].text;
document.all[element_id].value=event.srcElement.innerText+"/"+mn +"/" +Year;
//document.all.calendar.style.visibility="hidden";
document.all.calendar.style.display="none";
}
}
function GetBodyOffsetX(el_name, shift)
{
var x;
var y;
x = 0;
y = 0;
var elem = document.all[el_name];
do
{
x += elem.offsetLeft;
y += elem.offsetTop;
if (elem.tagName == "BODY")
break;
elem = elem.offsetParent;
} while (1 > 0);
shift[0] = x;
shift[1] = y;
return x;
}
function SetCalendarOnElement(el_name)
{
if (el_name=="")
el_name = element_id;
var shift = new Array(2);
GetBodyOffsetX(el_name, shift);
document.all.calendar.style.pixelLeft = shift[0]; // - document.all.calendar.offsetLeft;
document.all.calendar.style.pixelTop = shift[1] + 25 ;
}
function ShowCalendar(elem_name)
{
if (elem_name=="")
elem_name = element_id;
element_id = elem_name; // element_id is global variable
newCalendar();
SetCalendarOnElement(element_id);
//document.all.calendar.style.visibility = "visible";
document.all.calendar.style.display="inline";
}
function HideCalendar()
{
//document.all.calendar.style.visibility="hidden";
document.all.calendar.style.display="none";
}
function toggleCalendar(elem_name)
{
//if (document.all.calendar.style.visibility == "hidden")
if(document.all.calendar.style.display=="none")
ShowCalendar(elem_name);
else
HideCalendar();
}
-->
</script>
</head>
<body onLoad="MM_preloadImages('image/Back_11.gif')">
<div align="center">
<table width="706">
<tr>
<td width="700"><img src="image/hea.jpg" width="700" height="255"></td>
</tr>
<tr>
<td><table width="700">
<tr>
<td width="143" height="95" valign="top"><div align="center"><a href="persontab_detail.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','image/Back_11.gif',1)"><img src="image/Back_10.gif" name="Image2" width="143" height="22" border="0"></a>
<p> </p>
</div></td>
<td width="547" valign="top" bgcolor="#E2EEF3"><div align="center">
<table width="553">
<tr>
<td width="547" height="95" valign="top"><div align="center">
<table width="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#82B3C8">
<tr>
<td height="25"><div align="center"><span class="style12">ข้อมูลประวัติรับราชการ</span></div></td>
</tr>
</table>
<form action="persontab_add_function.php" method="get" enctype="multipart/form-data" name="form1">
<div align="left">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#CBDFE2">
<td width="21" bgcolor="#ECF3F4"> </td>
<td width="192" bgcolor="#ECF3F4"><div align="right"><span class="style10">เลขบัตรประจำตัวประชาชน</span></div></td>
<td width="14" bgcolor="#ECF3F4"> </td>
<td width="273" bgcolor="#ECF3F4"><input name="pID_P" type="text" id="pID_P" size="13" maxlength="13" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">เลขบัตรประจำตัวข้าราชการ</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pID_A" type="text" id="pID_A" size="13" maxlength="13" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#ECF3F4"> </td>
<td bgcolor="#ECF3F4"><div align="right"><span class="style10">เลขประจำตัวผู้เสียภาษ</span><span class="style8">ี</span></div></td>
<td bgcolor="#ECF3F4"> </td>
<td bgcolor="#ECF3F4"><input name="pID_T" type="text" id="pID_T" size="13" maxlength="10" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right" class="style10"> เลขที่ฌาปนกิจ</div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#82B3C8"><input name="pID_D" type="text" id="pID_D" size="13" maxlength="10" onKeyPress="check_number()"></td>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">ชื่อ</span></div></td>
<td> </td>
<td><input name="pFNAME2" type="text" id="pFNAME2"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">นามสกุล</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#82B3C8"><input name="pLNAME" type="text" id="pLNAME"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">เพศ</span></div></td>
<td> </td>
<td><span class="style8">
<select name="pGender" size="1">
<?
$strSQL = "SELECT * FROM GENDER_T where is_enable=1 order by GENDER_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["GENDER_ID"];?>" selected><?=$objResuut["GENDER_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> ศาสนา</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pReligion" size="1">
<?
$strSQL = "SELECT * FROM religion_t where is_enable=1 order by religion_id ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["RELIGION_ID"];?>" selected><?=$objResuut["RELIGION_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">กำเนิด</span></div></td>
<td> </td>
<td><span class="style14">
<select name="pOrigin" size="1">
<?
$strSQL = "SELECT * FROM origin_t where is_enable=1 order by origin_id ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["ORIGIN_ID"];?>" selected><?=$objResuut["ORIGIN_FNAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> เหล่า</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pCate_L" size="1">
<?
$strSQL = "SELECT * FROM CATE_T where is_enable=1 order by CATE_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["CATE_ID"];?>" selected><?=$objResuut["CATE_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">คำสั่งบรรจุครั้งแรก</span></div></td>
<td> </td>
<td><span class="style8">
<input id="popup_container" type="text" />
</span><input id="test_d" name="test_d" size="7" onclick="toggleCalendar('test_d')" />
<div></div> </td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> วัน เดือน ปีที่บรรจุครั้งแรก</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<input name="pDateOccoupy" type="text" id="pDateOccoupy" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right" class="style10"><span class="style8">ประเภทกำลังพล</span></div></td>
<td> </td>
<td><span class="style8">
<select name="pCate_P" size="1">
<?
$strSQL = "SELECT * FROM CATE_P_T where is_enable=1 order by CATE_P_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["CATE_P_ID"];?>" selected><?=$objResuut["CATE_P_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">สถานภาพสมรส</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<select name="pMarry" size="1">
<?
$strSQL = "SELECT * FROM MARRY_T where is_enable=1 order by MARRY_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["MARRY_ID"];?>" selected><?=$objResuut["MARRY_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select>
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">วันเดือนปีเกิด</span></div></td>
<td> </td>
<td><span class="style8">
<input name="pBirthday" type="text" id="pBirthday" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10"> วันเดือนปีที่นับอายุราชการ</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><span class="style8">
<input name="pDateREG" type="text" id="pDateREG" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">วันเดือนปีที่ขึ้นทะเบียน</span></div></td>
<td> </td>
<td><span class="style8">
<input name="pDateAGE" type="text" id="pDateAGE" size="10" maxlength="10">
</span></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">บ้านเลขท</span><span class="style8">ี่</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pNohome" type="text" id="pNohome" size="10" maxlength="10"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">หมู่ที่</span></div></td>
<td> </td>
<td><input name="pNomoo" type="text" id="pNomoo" onKeyPress="check_number()" size="5" maxlength="5"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">ถนน</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pRoad" type="text" id="pRoad"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">ซอย</span></div></td>
<td> </td>
<td><input name="pSoi" type="text" id="pSoi"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">แขวง/ตำบล</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pDistrict" type="text" id="pDistrict"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">เขต/อำเภอ</span></div></td>
<td> </td>
<td><input name="pBorder" type="text" id="pBorder"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">จังหวัด</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6">
<select name="pPrecinct" size="1">
<?
$strSQL = "SELECT * FROM PRECINCT_T where is_enable=1 order by PRECINCT_ID ASC";
$objQuery = mysql_query($strSQL);
while($objResuut = mysql_fetch_array($objQuery))
{
?>
<option value="<?=$objResuut["PRECINCT_ID"];?>" selected><?=$objResuut["PRECINCT_NAME"];?></option>
<?
}
?> <option selected=>-กรุณาเลือก-</option>
</select></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10">รหัสไปรษณีย</span><span class="style8">์</span></div></td>
<td> </td>
<td><input name="pZipcode" type="text" id="pZipcode" onKeyPress="check_number()" size="10" maxlength="5"></td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right"><span class="style10">โทรศัพท์บ้าน</span></div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><input name="pPhone1" type="text" id="pPhone1" size="10" maxlength="10" onKeyPress="check_number()"></td>
</tr>
<tr bgcolor="#ECF3F4">
<td> </td>
<td><div align="right"><span class="style10"> โทรศัพท์มือถือ</span></div></td>
<td> </td>
<td><input name="pPhone2" type="text" id="pPhone2" size="10" maxlength="10" onKeyPress="check_number()"> </td>
</tr>
<tr bgcolor="#CBDFE2">
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><div align="right">
<p class="style8"> </p>
<p class="style8">
<input type="submit" name="Submit" value="บันทึก">
</p>
</div></td>
<td bgcolor="#7CB1C6"> </td>
<td bgcolor="#7CB1C6"><p class="style8"> </p>
<p class="style8">
<input type="reset" name="Reset" value="ยกเลิก">
</p></td>
</tr>
</table>
</div>
</form>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="52"><div align="center"></div></td>
</tr>
</table>
</div>
<TABLE bgColor=#ffffff border=1 cellPadding=0 cellSpacing=3 id=calendar style="DISPLAY: none; POSITION: absolute; Z-INDEX: 4">
<TBODY>
<TR>
<TD colSpan=7 vAlign=center>
<!-- Month combo box -->
<SELECT id=month onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output months into the document.
// Select current month.
for (var intLoop = 0; intLoop < months.length; intLoop++)
document.write("<OPTION " + (today.month == intLoop ? "Selected" : "") + ">" + months[intLoop]);
</SCRIPT>
</SELECT>
<!-- Year combo box -->
<SELECT id=year onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output years into the document.
// Select current year.
for (var intLoop = 1900; intLoop < 2028; intLoop++)
document.write("<OPTION " + (today.year == intLoop ? "Selected" : "") + ">" + intLoop);
</SCRIPT>
</SELECT>
</TD>
</TR>
<TR class=days>
<!-- Generate column for each day. -->
<SCRIPT language=JavaScript>
// Output days.
for (var intLoop = 0; intLoop < days.length; intLoop++)
document.write("<TD>" + days[intLoop] + "</TD>");
</SCRIPT>
</TR>
<TBODY class=dates id=dayList onclick="getDate('')" vAlign=center>
<!-- Generate grid for individual days. -->
<SCRIPT language=JavaScript>
for (var intWeeks = 0; intWeeks < 6; intWeeks++)
{
document.write("<TR>");
for (var intDays = 0; intDays < days.length; intDays++)
document.write("<TD></TD>");
document.write("</TR>");
}
</SCRIPT>
<!-- Generate today day. --></TBODY>
<TBODY>
<TR>
<TD class=today colSpan=5 id=todayday onclick=getTodayDay()></TD>
<TD align=right colSpan=2><A href="javascript:HideCalendar();"><SPAN style="COLOR: black; FONT-SIZE: 10px"><B>Hide</B></SPAN></A></TD>
</TR>
</TBODY>
</TABLE>
</body>
</html>
ประวัติการแก้ไข 2010-08-17 14:09:53
Date :
2010-08-17 14:07:09
By :
namebom
ครับ เอาเฉพาะ ตัวหนา ออกครับ
ผมได้ลองเฉพาะ Code ด้านล่างตัดออกมาแล้วนำไปใส่ฟอร์ม Run แล้วทำการคลิก ปรากฎว่า ปฏิทินขึ้นครับ พอจะสรุปและหาทางแก้ได้ไหม
link rel="stylesheet" type="text/css" href="epoch_styles.css" />
<script type="text/javascript" src="epoch_classes.js"></script>
<script type="text/javascript">
<!--
var bas_cal,dp_cal,ms_cal;
window.onload = function () {
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
};
-->
</script>
<td><div align="right"><span class="style10">คำสั่งบรรจุครั้งแรก</span></div></td>
<td> </td>
<td><span class="style8">
<input id="popup_container" type="text" />
</span>
<div></div> </td>
ขอบคุณมากครับสำหรับทุกความคิดเห็นครับ
Date :
2010-08-17 14:12:41
By :
mixer98
ตอนนี้ได้แล้วครับ ต้องขอขอบคุณทุกท่านและทุกความคิดเห็น ถ้าติดจะมาถามใหม่ครับ
Date :
2010-08-17 16:14:51
By :
mixer98
Load balance : Server 02