it_id 타입 변경 및 상품코드 체크 코드 추가

This commit is contained in:
chicpro
2013-05-13 18:12:23 +09:00
parent f3a87afdf1
commit cd0bfe4431
5 changed files with 47 additions and 33 deletions

View File

@ -16,7 +16,7 @@ include_once(G4_PATH.'/head.sub.php');
<tbody>
<tr>
<th scope="row"><label for="new_it_id">상품코드</label></th>
<td><input type="text" name="new_it_id" value="<?php echo time(); ?>" id="new_it_id" class="frm_input"></td>
<td><input type="text" name="new_it_id" value="<?php echo time(); ?>" id="new_it_id" class="frm_input" maxlength="20"></td>
</tr>
</tbody>
</table>
@ -34,6 +34,11 @@ include_once(G4_PATH.'/head.sub.php');
function _copy(link)
{
var new_it_id = document.getElementById('new_it_id').value;
var t_it_id = new_it_id.replace(/[A-Za-z0-9\-]/g, "");
if(t_it_id.length > 0) {
alert("상품코드는 영문자, 숫자, - 만 사용할 수 있습니다.");
return false;
}
opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id);
self.close();
}