sms5 form전송시 두번 등록되는 오류 현상 수정
This commit is contained in:
@ -24,7 +24,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="send_write">
|
<div id="send_write">
|
||||||
<form name="form_sms" id="form_sms" method="post" action="sms_write_send.php" onsubmit="return send(this);" >
|
<form name="form_sms" id="form_sms" method="post" action="sms_write_send.php" onsubmit="return sms5_chk_send(this);" >
|
||||||
<input type="hidden" name="send_list" value="">
|
<input type="hidden" name="send_list" value="">
|
||||||
|
|
||||||
<h2>보낼내용</h2>
|
<h2>보낼내용</h2>
|
||||||
@ -230,38 +230,43 @@ function overlap_check()
|
|||||||
})(jQuery);
|
})(jQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
function send(f)
|
var is_sms5_submitted = false; //중복 submit방지
|
||||||
|
function sms5_chk_send(f)
|
||||||
{
|
{
|
||||||
var hp_list = document.getElementById('hp_list');
|
if( is_sms5_submitted == false ){
|
||||||
var wr_message = document.getElementById('wr_message');
|
is_sms5_submitted = true;
|
||||||
var hp_number = document.getElementById('hp_number');
|
var hp_list = document.getElementById('hp_list');
|
||||||
var list = '';
|
var wr_message = document.getElementById('wr_message');
|
||||||
|
var hp_number = document.getElementById('hp_number');
|
||||||
|
var list = '';
|
||||||
|
|
||||||
if (!wr_message.value) {
|
if (!wr_message.value) {
|
||||||
alert('메세지를 입력해주세요.');
|
alert('메세지를 입력해주세요.');
|
||||||
wr_message.focus();
|
wr_message.focus();
|
||||||
return false;
|
is_sms5_submitted = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hp_list.length < 1) {
|
||||||
|
alert('받는 사람을 입력해주세요.');
|
||||||
|
hp_number.focus();
|
||||||
|
is_sms5_submitted = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<hp_list.length; i++)
|
||||||
|
list += hp_list.options[i].value + '/';
|
||||||
|
|
||||||
|
w = document.body.clientWidth/2 - 200;
|
||||||
|
h = document.body.clientHeight/2 - 100;
|
||||||
|
act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
|
||||||
|
act.focus();
|
||||||
|
|
||||||
|
f.send_list.value = list;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
alert("데이터 전송중입니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hp_list.length < 1) {
|
|
||||||
alert('받는 사람을 입력해주세요.');
|
|
||||||
hp_number.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<hp_list.length; i++)
|
|
||||||
list += hp_list.options[i].value + '/';
|
|
||||||
|
|
||||||
w = document.body.clientWidth/2 - 200;
|
|
||||||
h = document.body.clientHeight/2 - 100;
|
|
||||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
|
|
||||||
act.focus();
|
|
||||||
|
|
||||||
f.target = '';
|
|
||||||
f.action = 'sms_write_send.php';
|
|
||||||
f.send_list.value = list;
|
|
||||||
f.submit();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function hp_add()
|
function hp_add()
|
||||||
@ -645,6 +650,9 @@ var sms_obj={
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
(function($){
|
(function($){
|
||||||
|
$("#form_sms input[type=text], #form_sms select, #form_sms textare").keypress(function(e){
|
||||||
|
return e.keyCode != 13;
|
||||||
|
});
|
||||||
sms_obj.fn_paging = function( hash_val,total_page,$el,$search_form ){
|
sms_obj.fn_paging = function( hash_val,total_page,$el,$search_form ){
|
||||||
$el.paging({
|
$el.paging({
|
||||||
current:hash_val ? hash_val : 1,
|
current:hash_val ? hash_val : 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user