form action값이 어디로 넘어 가는건가요?
본문
안녕하세요!
아래 소스가 폼을 입력 받는 소스인데요
대부분 action으로 어디 파일로 넘어가는지 나오는데 이건 알수가 없는데요
가르침 부탁드려요 ~ 뭘하나 추가 해야하는데 알수가 없어서요..
알려주세요 ~
<? require_once "$_SERVER[DOCUMENT_ROOT]/HWI_INC/head.php"; ?>
<?
/*
if ( !$_SESSION[UID] ) {
msg("로그인 회원에 한해서 접속이 가능합니다.","/HWI_ORDER/order.php","");
}
*/
?>
<script>
function hpLength(obj) {
if ( obj.value.length == 6 ) {
document.hForder.Honum2.focus();
}
}
function hpLengthTel1(obj) {
if ( obj.value.length == 4 ) {
document.hForder.Hotel2.focus();
}
}
function hpLengthTel2(obj) {
if ( obj.value.length == 4 ) {
document.hForder.Hotel3.focus();
}
}
function hpLengthHp1(obj) {
if ( obj.value.length == 4 ) {
document.hForder.Hohp2.focus();
}
}
function hpLengthHp2(obj) {
if ( obj.value.length == 4 ) {
document.hForder.Hohp3.focus();
}
}
function onlyNumber() {
if(event.ctrlKey && event.keyCode=='V'.charCodeAt(0) ) {
event.returnValue=false;
}
if((event.keyCode<48)||(event.keyCode>57))
event.returnValue=false;
}
function hoSubmit() {
var FORM = document.hForder ;
if ( FORM.Hosum.value == "" || FORM.Hosum.value == "" ) {
alert("1개 이상의 수강과목을 선택해주세요");
return ;
}
if ( FORM.Honame.value == "" ) {
alert("이름을 입력하세요.");
FORM.Honame.focus();
return ;
}
if ( FORM.Honum1.value == "" ) {
alert("주민등록번호를 입력하세요.");
FORM.Honum1.focus();
return ;
}
if ( FORM.Honum2.value == "" ) {
alert("주민등록번호를 입력하세요.");
FORM.Honum2.focus();
return ;
}
var first = FORM.Honum1.value;
var last = FORM.Honum2.value;
if( first=="" )
{
alert("주민번호 앞자리를 입력하세요");
FORM.Honum1.focus();
return ;
}
if( last=="" )
{
alert("주민번호 뒷자리를 입력하세요");
FORM.Honum2.focus();
return ;
}
if( first.length!=6 )
{
alert("유효한 주민번호가 아닙니다.");
FORM.Honum1.value = "";
FORM.Honum2.value = "";
FORM.Honum1.focus();
return ;
}
if( last.length!=7 )
{
alert("유효한 주민번호가 아닙니다.");
FORM.Honum1.value = "";
FORM.Honum2.value = "";
FORM.Honum1.focus();
return ;
}
var hap=0;
for(var i=0;i<6;i++)
{
var temp=first.charAt(i)*(i+2);
hap+=temp;
}
var n1=last.charAt(0);
var n2=last.charAt(1);
var n3=last.charAt(2);
var n4=last.charAt(3);
var n5=last.charAt(4);
var n6=last.charAt(5);
var n7=last.charAt(6);
hap+=n1*8+n2*9+n3*2+n4*3+n5*4+n6*5;
hap %=11;
hap=11-hap;
hap%=10;
if(hap !=n7)
{
alert("유효한 주민번호가 아닙니다.");
FORM.Honum1.value="";
FORM.Honum2.value="";
FORM.Honum1.focus();
return ;
}
FORM.Honum.value = FORM.Honum1.value+FORM.Honum2.value;
if ( FORM.Hohp1.value == "" || FORM.Hohp2.value == "" || FORM.Hohp3.value == "" ) {
alert("핸드폰번호를 입력하세요.");
FORM.Hohp1.focus();
return ;
}
if ( FORM.Hotel1.value == "" || FORM.Hotel2.value == "" || FORM.Hotel3.value == "" ) {
alert("전화번호를 입력하세요.");
FORM.Hotel1.focus();
return ;
}
if ( FORM.Hoemail.value == "" ) {
alert("이메일을 입력하세요.");
FORM.Hoemail.focus();
return ;
}
if ( FORM.Hozip1.value == "" || FORM.Hozip2.value == "" ) {
alert("우편번호찾기 버튼을 눌러 주소를 입력하세요.");
return ;
}
hoSettlement();
}
function hoSettlement() {
var FORM = document.hForder;
/*
if ( FORM.Hosettltype[0].checked == false && FORM.Hosettltype[1].checked == false && FORM.Hosettltype[2].checked == false && FORM.Hosettltype[3].checked == false) {
alert('결제 방법을 선택하세요.');
FORM.Hosettltype[0].focus();
return;
}
if ( FORM.Hosettltype[0].checked == true ) {
if ( FORM.Horeceiptbank.value == '' ) {
alert("입금은행을 선택해주세요.");
FORM.Horeceiptbank.focus();
return;
}
if ( FORM.Horeceiptname.value == '' ) {
alert("입금자명을 입력해주세요.");
FORM.Horeceiptname.focus();
return;
}
if ( FORM.Horeceiptmoment.value == '' ) {
alert("입금예정일을 입력해주세요.");
FORM.Horeceiptmoment.focus();
return;
}
FORM.target = 'PROCESS';
FORM.method = 'POST';
FORM.action = './module/settle_bank.php';
FORM.submit();
} else if ( FORM.Hosettltype[1].checked == true ) {
FORM.target = 'PROCESS';
FORM.method = 'POST';
FORM.action = './module/settle_card2.php';
FORM.submit();
}
*/
/*
} else if ( FORM.Hosettltype[1].checked == true ) {
PROCESS.form1.MsgTypeCode.MsgTypeCode[4].checked = true;PROCESS.goScript();
} else if ( FORM.Hosettltype[2].checked == true ) {
PROCESS.goScript();
}
*/
//else if ( FORM.Hosettltype[2].checked == true ) {
// PROCESS.Pay(top.PROCESS.document.frmAGS_pay);
//}
FORM.target = 'PROCESS';
FORM.method = 'POST';
FORM.action = './module/settle.php';
FORM.submit();
}
function hoSettltype() {
var FORM = document.hForder;
/*
alert("지금은 수강신청기간이 아닙니다. 등록일은 8월4일부터 9월5일입니다.");
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
*/
if ( FORM.Hosum.value == "" || FORM.Hosum.value == "0" ) {
alert("1개 이상의 수강과목을 선택해주세요");
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Honame.value == "" ) {
alert("이름을 입력하세요.");
FORM.Honame.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Honum1.value == "" ) {
alert("주민등록번호를 입력하세요.");
FORM.Honum1.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Honum2.value == "" ) {
alert("주민등록번호를 입력하세요.");
FORM.Honum2.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
FORM.Honum.value = FORM.Honum1.value+FORM.Honum2.value;
if ( FORM.Hohp1.value == "" || FORM.Hohp2.value == "" || FORM.Hohp3.value == "" ) {
alert("핸드폰번호를 입력하세요.");
FORM.Hohp1.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Hotel1.value == "" || FORM.Hotel2.value == "" || FORM.Hotel3.value == "" ) {
alert("전화번호를 입력하세요.");
FORM.Hotel1.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Hoemail.value == "" ) {
alert("이메일을 입력하세요.");
FORM.Hoemail.focus();
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Hozip1.value == "" || FORM.Hozip2.value == "" ) {
alert("우편번호찾기 버튼을 눌러 주소를 입력하세요.");
document.hForder.Hosettltype[0].checked = false;
document.hForder.Hosettltype[1].checked = false;
document.hForder.Hosettltype[2].checked = false;
document.hForder.Hosettltype[3].checked = false;
return ;
}
if ( FORM.Hosettltype[0].checked == true ) {
document.getElementById('HOrderID1').style.display = 'block' ;
document.getElementById('HOrderID2').style.display = 'none' ;
document.getElementById('HOrderID3').style.display = 'none' ;
document.getElementById('HOrderID4').style.display = 'none' ;
} else if ( FORM.Hosettltype[1].checked == true ) {
document.getElementById('HOrderID1').style.display = 'none' ;
document.getElementById('HOrderID2').style.display = 'none' ;
document.getElementById('HOrderID3').style.display = 'block' ;
document.getElementById('HOrderID4').style.display = 'none' ;
FORM.target = 'PROCESS';
FORM.method = 'POST';
FORM.action = '/module/test.php';
FORM.submit();
} else if ( FORM.Hosettltype[3].checked == true ) {
document.getElementById('HOrderID1').style.display = 'none' ;
document.getElementById('HOrderID2').style.display = 'none' ;
document.getElementById('HOrderID3').style.display = 'none' ;
document.getElementById('HOrderID4').style.display = 'block' ;
} else if ( FORM.Hosettltype[2].checked == true ) {
document.getElementById('HOrderID1').style.display = 'none' ;
document.getElementById('HOrderID2').style.display = 'block' ;
document.getElementById('HOrderID3').style.display = 'none' ;
document.getElementById('HOrderID4').style.display = 'none' ;
FORM.target = 'PROCESS';
FORM.method = 'POST';
FORM.action = '/module/test.php';
FORM.submit();
}
}
function Zipcode_search() {
window.open("./zipcode/zipcode.php","zipcode","width=550,height=250,status=no,scrollbars=yes");
}
function hoSchool(ID) {
var SUM = "0";
var SUM1 = "";
for ( cnt=100; cnt<133; cnt++ ) {
//if ( cnt == 74 || cnt == 77 ) continue;
TMP = eval("document.hForder.Hpid"+cnt);
if ( TMP != undefined ) {
if ( TMP.checked == true ) {
if ( cnt == 100 ) {
SUM1 = 290000;
} else if ( cnt == 101 || cnt == 102 || cnt == 103 ) {
SUM1 = 500000;
} else if ( cnt == 104 ) {
SUM1 = 470000;
} else if ( cnt == 106 || cnt == 107 ) {
SUM1 = 490000;
} else if ( cnt == 114 || cnt == 115 || cnt == 117 || cnt == 119 || cnt == 132 ) {
SUM1 = 420000;
} else if ( cnt == 108 ) {
SUM1 = 350000;
} else if ( cnt == 105 ) {
SUM1 = 280000;
} else if ( cnt == 109 ) {
SUM1 = 520000;
} else if ( cnt == 110 || cnt == 111) {
SUM1 = 420000;
} else if ( cnt == 112 || cnt == 120 ) {
SUM1 = 350000;
} else if ( cnt == 113 ) {
SUM1 = 250000;
} else if ( cnt == 116 ) {
SUM1 = 500000;
} else if ( cnt == 118 ) {
SUM1 = 550000;
} else if ( cnt == 121 ) {
SUM1 = 470000;
} else if ( cnt == 122 ) {
SUM1 = 280000;
} else if ( cnt == 123 ) {
SUM1 = 520000;
} else if ( cnt == 124 ) {
SUM1 = 350000;
} else if ( cnt == 125 ) {
SUM1 = 420000;
} else if ( cnt == 126 ) {
SUM1 = 420000;
} else if ( cnt == 127 ) {
SUM1 = 280000;
} else if ( cnt == 128 ) {
SUM1 = 520000;
} else if ( cnt == 129 ) {
SUM1 = 420000;
} else if ( cnt == 130 ) {
SUM1 = 420000;
} else if ( cnt == 131 ) {
SUM1 = 280000;
}
SUM = parseInt(SUM) + parseInt(SUM1);
}
}
}
document.hForder.Hosum.value = SUM;
}
</script>
<table width="300" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width=20%> </td>
<td align=center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td><img src="./images/sub_bar3_3_01.gif" align=absmiddle> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="font1">
<form name=hForder >
<input type=hidden name=Honum >
<!--
<tr><td colspan=4 align=left><b>단기반 모집</b></td></tr>
<tr>
<th bgcolor="#FFFFFF" scope="row" width=150>자기주도학습지도사10기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type="hidden" name=Hpid114 value="" onclick="hoSchool(this.value);" >
<input type="hidden" name=Hpid115 value="" onclick="hoSchool(this.value);" >
<input type=hidden name=Hpid117 value="" onclick="hoSchool(this.value);" disabled><font color=red></font>
<input type=hidden name=Hpid119 value="" onclick="hoSchool(this.value);" disabled><font color=red></font>
<input type=hidden name=Hpid125 value="" onclick="hoSchool(this.value);" >
<input type=checkbox name=Hpid126 value="126" onclick="hoSchool(this.value);" >목 10:00~13:00 개강일 2010.2.18 <br>
</td>
<td height="30" bgcolor="#FFFFFF" width=25><div align="center">10주
</div></td>
<td height="30" bgcolor="#FFFFFF" width=35><div align="center">42 만원</div> </td>
</tr>
<input type="hidden" name=Hpid118 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid120 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid116 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid121 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid122 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid123 value="" onclick="hoSchool(this.value);" disabled>
<input type="hidden" name=Hpid124 value="" onclick="hoSchool(this.value);" disabled>
-->
</table>
<br>
<?
$query = "select * from _Hcontent where MAIL_code='11'";
$result = $mysql->Query($query);
$row = $mysql->Fetch_Array($result);
echo $row[MAIL_content];
?>
<br>
<!--
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="font1">
<tr><td colspan=4 align=left><b style=color:red>수강신청 문의;*** 개인정보보호를 위한 전화번호 노출방지 ***~8</b></td></tr>
</table>
-->
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="40bfb9" class="font1">
<!--
<form name=hForder >
<input type=hidden name=Honum >
-->
<tr>
<tr><td colspan=4 align=left><b>2010년 봄학기</b></td></tr>
<tr>
<th bgcolor="#FFFFFF" scope="row" width=150>두뇌교육지도사 2기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid100 value="100" onclick="hoSchool(this.value);" disabled> <font color=red></font>화 오전반 10:00~13:00</td>
<td width=70 bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월9일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">8주
</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">29 만원</div> </td>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row">미술 치료사 10기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid101 value="101" onclick="hoSchool(this.value);" disabled> <font color=red>마감</font> 목 오전반 10:00~13:00 <br>
<input type=checkbox name=Hpid102 value="102" onclick="hoSchool(this.value);" disabled> <font color=red>마감</font> 토 오전반 10:00~13:00 <br>
<input type=checkbox name=Hpid103 value="103" onclick="hoSchool(this.value);" >
심화반(토) 10:00~13:00 </td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월11일<br>3월13일<br>3월13일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">15주
</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">50 만원</div> </td>
</tr>
<!--
<tr>
<th bgcolor="#FFFFFF" scope="row">미술 치료사 11기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid131 value="131" onclick="hoSchool(this.value);" disabled> <font color=red></font> 토오전반 10:00~13:00</td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월20일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">15주
</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">50 만원</div> </td>
</tr>
-->
<!--
<tr>
<td height="30" bgcolor="#FFFFFF" style="PADDING: 10px;">
<input type=checkbox name=Hpid73 value="73" onclick="hoSchool(this.value);" > <font color=red></font>방학반(토) 10:00~17:00
</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">8주<br>
</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">45 만원</div></td>
</tr>
-->
<tr>
<th height="30" bgcolor="#FFFFFF" scope="row">방과후아동지도사 9기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<!--input type=checkbox name=Hpid9 value="9" onclick="hoSchool(this.value);" > 금요 오전반 10:00~13:00<br-->
<input type=checkbox name=Hpid104 value="104" onclick="hoSchool(this.value);" >
목 저녁반 19:00~22:00 </td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월11일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">15주</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">47 만원</div></td>
</tr>
<tr>
<th height="30" bgcolor="#FFFFFF" scope="row">북아트지도사 7기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<!--input type=checkbox name=Hpid9 value="9"기onclick="hoSchool(this.value);" > 금요 오전반 10:00~13:00<br>
<input type=checkbox name=Hpid105 value="105" onclick="hoSchool(this.value);" >
목 오전반 10:00~13:00-->
<input type=checkbox name=Hpid131 value="131" onclick="hoSchool(this.value);" >
토 종일반 10:00~17:00>
<!--
<br>
<input type=checkbox name=Hpid127 value="127" onclick="hoSchool(this.value);" >
<a href="http://edulife.konkuk.ac.kr/sub/03_general/new2010_course_guide_view.php?sbjt_id=0016&cors_deta_cd=002016" target="_blank" >토 오전반 10:00~13:00</a> <br>
<input type="checkbox" name="Hpid26" value="26" onclick="hoSchool(this.value);" >
금요 오전반 10:00~13:00
--> </td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">5월29일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">4주</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">28 만원</div></td>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row">아동미술지도사 14기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid107 value="107" onclick="hoSchool(this.value);" > 화 오전반 - 10:00~13:00<br>
<input type=checkbox name=Hpid106 value="106" onclick="hoSchool(this.value);" > 토 오전반 - 10:00~13:00
<!--
<input type=checkbox name=Hpid48 value="48" onclick="hoSchool(this.value);" >
목요 저녁반 - 19:00~22:00 <br> ( 봄학기 재학생만 수강가능 )
--> </td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월9일<br>3월13일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">15주
</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">49 만원</div>
<div align="center">
</td>
</tr>
<tr>
<th height="30" bgcolor="#FFFFFF" scope="row">수채화지도사 5기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid108 value="108" onclick="hoSchool(this.value);" > 금 오전반 - 10:00~13:00</td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월12일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">10주</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">35 만원</div></td>
</tr>
<tr>
<th height="30" bgcolor="#FFFFFF" scope="row">영어교육지도사 3기</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=checkbox name=Hpid128 value="128" onclick="hoSchool(this.value);" > 목 오전반 10:00~13:00<br>
<input type=checkbox name=Hpid109 value="109" onclick="hoSchool(this.value);" > 토 오전반 10:00~13:00
</td>
<td bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">3월11일<br>3월13일</td>
<td height="30" bgcolor="#FFFFFF"><div align="center">15주</div></td>
<td height="30" bgcolor="#FFFFFF"><div align="center">52 만원</div></td>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row">자기주도학습지도사 11기<br>자기주도학습지도사 12기<br>자기주도학습지도사 13기<br>자기주도학습지도사 14기
</th>
<td height="30" bgcolor="#FFFFFF" style="PADDING-LEFT: 10px;">
<input type=hidden name=Hpid110 value="" onclick="hoSchool(this.value);" disabled >
<input type=checkbox name=Hpid111 value="111" onclick="hoSchool(this.value);" > 화목 오전반 - 10:00~13:00<br>
&n
답변 3
자바스크립트 코드 중에 "FORM.action" 코드를 찾아가 보시면 됩니다.
FORM.action = '/module/test.php';
현재 코드를 보면, 선택 항목에 따라 분기하고 있습니다.
function hoSettlement() 에 선택된 값에 따라 action 페이지를 분기하는 부분이 있는것 같네요.
행복의길님, 답변을 채택해 주셔서 감사드립니다. (_ _)