로그인 하지 않은 회원의 경우는 바로 로그인 창으로 이동하게 하고 싶습니다
비회원이나 로그인하지 않은 회원(비슷한 의미죠??)이 질문하기 버튼을 누르는 경우
로그인 창으로 바로 이동하게 하고 싶습니다.
<table width=100% cellpadding=0 cellspacing=0>
<tr><td colspan=2 height=35>* 이 상품에 대한 궁금한 사항이 있으신 분은 질문해 주십시오.
<input type=image src='<? echo "$g4[shop_img_path]/btn_qa.gif"?>' onclick="itemqa_insert(itemqa);" align=absmiddle></td></tr>
</table>
<tr><td colspan=2 height=35>* 이 상품에 대한 궁금한 사항이 있으신 분은 질문해 주십시오.
<input type=image src='<? echo "$g4[shop_img_path]/btn_qa.gif"?>' onclick="itemqa_insert(itemqa);" align=absmiddle></td></tr>
</table>
그래서, onclick을 했을 때 회원인지 확인을 해서 로그인 화면으로 이동하도록
만들었습니다. 이동은 잘 하고 있는데... 문제는 비회원을 위한 입력창이 보인
이후에 이동을 한다는 겁니다. 바로 이동하게 만들 수 없나요???
제가 해보니까 계속 오류가 나서 짜집기의 한계를 느끼네요. -..-a
<script language="JavaScript">
function itemqa_insert()
{
var f = document.fitemqa;
var id = document.getElementById('itemqa');
function itemqa_insert()
{
var f = document.fitemqa;
var id = document.getElementById('itemqa');
id.style.display = 'block';
f.w.value = '';
f.iq_id.value = '';
if (!g4_is_member)
{
<?
echo "document.location.href = '$g4[path]/bbs/login.php?url=".urlencode("$g4[shop_path]/item.php?it_id=$it[it_id]")."';";
?>
// f.iq_name.value = '';
// f.iq_name.readOnly = false;
// f.iq_password.value = '';
}
f.iq_subject.value = '';
f.iq_question.value = '';
}
f.iq_id.value = '';
if (!g4_is_member)
{
<?
echo "document.location.href = '$g4[path]/bbs/login.php?url=".urlencode("$g4[shop_path]/item.php?it_id=$it[it_id]")."';";
?>
// f.iq_name.value = '';
// f.iq_name.readOnly = false;
// f.iq_password.value = '';
}
f.iq_subject.value = '';
f.iq_question.value = '';
}
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 2개
{
var f = document.fitemqa;
var id = document.getElementById('itemqa');
f.w.value = '';
f.iq_id.value = '';
if (!g4_is_member)
{
<?
echo "document.location.href = '$g4[path]/bbs/login.php?url=".urlencode("$g4[shop_path]/item.php?it_id=$it[it_id]")."';";
?>
// f.iq_name.value = '';
// f.iq_name.readOnly = false;
// f.iq_password.value = '';
} else {
id.style.display = 'block';
}
f.iq_subject.value = '';
f.iq_question.value = '';
}
id.style.display = 'block'; 이것이 java script에서 form을 보여주는 함수였군요. ㅋㅋ...