옵션버튼 수정 좀 도와주세요..ㅜ.ㅜ 정보
옵션버튼 수정 좀 도와주세요..ㅜ.ㅜ본문
<tr>
<td style='padding-left:20px; height:30px;' colspan=2>
· 선택사항 :
<input type=radio name=wr_6 <?if(!$view[wr_6]||$view[wr_6]=='1'):?> checked<?endif?> value="1">A형
<input type=radio name=wr_6 <?if($view[wr_6]=='2')echo "checked";?> value="2">B형
<input type=radio name=wr_6 <?if($view[wr_6]=='3')echo "checked";?> value="3">기타 (<input class=ed maxlength=10 size=3 name=wr_7 id=type1 value="<?=$view[wr_7]?>">)
</td>
</tr>
<td style='padding-left:20px; height:30px;' colspan=2>
· 선택사항 :
<input type=radio name=wr_6 <?if(!$view[wr_6]||$view[wr_6]=='1'):?> checked<?endif?> value="1">A형
<input type=radio name=wr_6 <?if($view[wr_6]=='2')echo "checked";?> value="2">B형
<input type=radio name=wr_6 <?if($view[wr_6]=='3')echo "checked";?> value="3">기타 (<input class=ed maxlength=10 size=3 name=wr_7 id=type1 value="<?=$view[wr_7]?>">)
</td>
</tr>
옵션버튼 3개중에서 마지막 기타형을 선택할 경우에만 옆에 텍스트 박스에 값을 입력할 수 있도록 하고 싶은데..
어떻게 해야 하나요??
댓글 전체

아래 내용을 php 혹은 html 문서로 저장하여 기타를 선택해보세요. ^ ^
- 원본 출처 : www.sayclub.com
- 퍼온 곳 : www.morssola.com
============================================
<script>
function clickpo_type(num)
{
var fo = document.fpolice;
if (parseInt(num) > 0)
{
fo.po_memo.value = "신고이유 직접입력";
fo.po_memo.disabled = true;
fo.po_memo.style.backgroundColor = "#EAEAEA";
}
else
{
fo.po_memo.value = "";
fo.po_memo.disabled = false;
fo.po_memo.style.backgroundColor = "#FFFFFF";
fo.po_memo.focus();
}
}
function checkReason()
{
var doc = document.fpolice;
var length = doc.po_type.length;
var cnt = 0;
for (var i=0; i<length; i++)
{
if (doc.po_type[i].checked)
cnt++;
}
if (cnt == 0)
{
alert("신고이유를 선택하여 주시기 바랍니다.");
return false;
}
return true;
}
</script>
<form name=fpolice method=post action="javascript:fpolice_submit(document.fpolice)" enctype="multipart/form-data">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td>
<table style='border:1px solid #E4E4E4;' cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:5 10px;" width="100" valign="top">
신고이유 선택</td>
<td bgcolor="#e4e4e4" width="1"></td>
<td style="padding:0 10px;" width="300">
<table cellpadding="0" cellspacing="0" border="0" valign="top">
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="1" onClick="javascript:clickpo_type('1');"> 불건전한 하우스를 개설함</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="2" onClick="javascript:clickpo_type('2');"> 불법 자료 유통을 목적으로 개설함</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="3" onClick="javascript:clickpo_type('3');"> 운영자, 회원에게 피해를 주는 하우스를 개설</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="0" onClick="javascript:clickpo_type('0');"> 기타</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="100">
<textarea name=po_memo style='width:259px; height:64px; padding:5; overflow:yes; background-color:#EAEAEA;' disabled onKeyUp="javascript:if (document.fpolice.po_memo.value.length >= 100) { alert('신고이유는 100자 이하로만 써주세요.'); document.fpolice.po_memo.value = document.fpolice.po_memo.value.substring(0, 99); }">신고이유 직접입력</textarea></td>
</tr>
</table></td>
</tr>
</table>
</form>
- 원본 출처 : www.sayclub.com
- 퍼온 곳 : www.morssola.com
============================================
<script>
function clickpo_type(num)
{
var fo = document.fpolice;
if (parseInt(num) > 0)
{
fo.po_memo.value = "신고이유 직접입력";
fo.po_memo.disabled = true;
fo.po_memo.style.backgroundColor = "#EAEAEA";
}
else
{
fo.po_memo.value = "";
fo.po_memo.disabled = false;
fo.po_memo.style.backgroundColor = "#FFFFFF";
fo.po_memo.focus();
}
}
function checkReason()
{
var doc = document.fpolice;
var length = doc.po_type.length;
var cnt = 0;
for (var i=0; i<length; i++)
{
if (doc.po_type[i].checked)
cnt++;
}
if (cnt == 0)
{
alert("신고이유를 선택하여 주시기 바랍니다.");
return false;
}
return true;
}
</script>
<form name=fpolice method=post action="javascript:fpolice_submit(document.fpolice)" enctype="multipart/form-data">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td>
<table style='border:1px solid #E4E4E4;' cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:5 10px;" width="100" valign="top">
신고이유 선택</td>
<td bgcolor="#e4e4e4" width="1"></td>
<td style="padding:0 10px;" width="300">
<table cellpadding="0" cellspacing="0" border="0" valign="top">
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="1" onClick="javascript:clickpo_type('1');"> 불건전한 하우스를 개설함</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="2" onClick="javascript:clickpo_type('2');"> 불법 자료 유통을 목적으로 개설함</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="3" onClick="javascript:clickpo_type('3');"> 운영자, 회원에게 피해를 주는 하우스를 개설</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="25">
<input type=radio name="po_type" value="0" onClick="javascript:clickpo_type('0');"> 기타</td>
</tr>
<tr>
<td width="300" style="padding:0 10px;" height="100">
<textarea name=po_memo style='width:259px; height:64px; padding:5; overflow:yes; background-color:#EAEAEA;' disabled onKeyUp="javascript:if (document.fpolice.po_memo.value.length >= 100) { alert('신고이유는 100자 이하로만 써주세요.'); document.fpolice.po_memo.value = document.fpolice.po_memo.value.substring(0, 99); }">신고이유 직접입력</textarea></td>
</tr>
</table></td>
</tr>
</table>
</form>
정말 원하던 내용 입니다.
진심으로 감사드립니다. ^^
진심으로 감사드립니다. ^^