TOP003.inc 2.66 KB
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var SFlg = false;              //サブミットフラグを定義
function DoubleSubmit(){      //ダブルサブミットチェック関数
   if (SFlg){                    //ダブルサブミットの場合
    alert("応答中です");         //メッセージを出力
    return false;
   }
   SFlg = true;                  //サブミットフラグを設定
   return true;                  //戻り値を設定
}

function chk(syain_cd,intsts){
	//訪問先入力
	if (document.e_gru.jyokyo.value==1){
		if (document.e_gru.hour.value=="" || document.e_gru.minute.value==""){
			alert("出社時間を選択してください");
			document.e_gru.hour.focus();
			return false;
		}
	}
	if (document.e_gru.jyokyo.value==2){
		if (document.e_gru.hour.value=="" || document.e_gru.minute.value==""){
			alert("退社時間を選択してください");
			document.e_gru.hour.focus();
			return false;
		}
	}
	if (document.e_gru.jyokyo.value==3){
		if (document.e_gru.hour.value=="" || document.e_gru.minute.value==""){
			alert("外出時間を選択してください");
			document.e_gru.hour.focus();
			return false;
		}
		if (hissu_chk("外出先",document.e_gru.place.value)==false) {
			document.e_gru.place.focus();
			return false;
		}
		if (script_chk("外出先",document.e_gru.place.value)==false) {
			document.e_gru.place.focus();
			return false;
		}
	}
	if (document.e_gru.jyokyo.value==4){
		if (document.e_gru.hour.value=="" || document.e_gru.minute.value==""){
			alert("帰社時間を選択してください");
			document.e_gru.hour.focus();
			return false;
		}
	}
	if (DoubleSubmit()) {
		document.e_gru.intsts.value=intsts;
		document.e_gru.syain_cd.value=syain_cd;
		document.e_gru.action = "TOP009.php";
		document.e_gru.method="POST";
		document.e_gru.submit();
	}
}
function submit1(){
	location.href = 'TOP000.php';
	return false;
}
function move_date(strDate){
	if (DoubleSubmit()) {
		document.e_gru.strwkdate.value=strDate;
		document.e_gru.action = "TOP003.php";
		document.e_gru.method="POST";
		document.e_gru.submit();
	}
}

function getDate(){
	if (DoubleSubmit()) {
		document.e_gru.strwkdate.value=document.e_gru.main_year.value+document.e_gru.main_mon.value+"01";
		document.e_gru.action = "TOP003.php";
		document.e_gru.method="POST";
		document.e_gru.submit();
	}
}

function edit(strwkdate,intsts){
	if (DoubleSubmit()) {
		document.e_gru.intsts.value=intsts;	
		document.e_gru.strwkdate.value=strwkdate;
		document.e_gru.action = "TOP003.php";
		document.e_gru.method="POST";
		document.e_gru.submit();
	}
}

function toroku(strwkdate,intsts){
	if (DoubleSubmit()) {
		document.e_gru.intsts.value=intsts;	
		document.e_gru.strwkdate.value=strwkdate;
		document.e_gru.action = "TOP009.php";
		document.e_gru.method="POST";
		document.e_gru.submit();
	}
}

-->
</SCRIPT>