라디오버튼 체크시 ..;

라디오버튼 체크시 ..;

QA

라디오버튼 체크시 ..;

본문

아래코드는 라디오버튼시 이벤트인데요  onclick 클릭시 두가지가 성립되게요
onclick="javascript:QnaShow('qna1')" onclick=Click('wr_2', '100');" 이부분을 어떡해야 할지 모르겠네요 방법이 없나요
물론 위처럼하면 하나만 적용됩니다. 
아시면.....;;;;

<script language="javascript">
<!--
function QnaShow(qna) {
 document.all.qna1.style.display = "none";
 document.all.qna2.style.display = "none";
 var obj = eval("document.all." + qna); 
 obj.style.display = "block";
}
//-->
</script> 
<th scope="row">선 택</th>

<input type="radio" name="wr_1" value="1번값" onclick="javascript:QnaShow('qna1')" onclick=Click('wr_2', '100');"><img src="./imgg/bull_005.gif" border="0">

<input type="radio" name="wr_1" value="2번값" onclick="javascript:QnaShow('qna2')" onclick=Click('wr_2', '100');"><img src="./imgg/bull_007.gif" border="0">
<br> 
<select id="wr_2" name="wr_2"> 
<option value="100">100</option> 
<option value="200">200</option> 
</select> 
<script type="text/javascript"> 
function Click(id, num) 
    document.getElementById("" + id + "").value = num; 
</script> 
 
<table align="center" id="qna1" cellspacing="0" width="100%"><tr><td>aaa</td></tr></table>
<table align="center" id="qna2" cellspacing="0" width="100%"><tr><td>bbb</td></tr></table>

이 질문에 댓글 쓰기 :

답변 2

onclick="javascript:QnaShow('qna1')" onclick=Click('wr_2', '100');" 



onclick="QnaShow('qna1');Click('wr_2', '100');" 

처럼 바꿔보세요.

감사합니다. 잘 됩니다. ^^
해결해 주셔서 많이 고맙습니다. ^^
근데 아래부분은 처음부터 보이던데 첨엔 보이지 않게는 어케...;;
<script language="javascript">
<!--
function QnaShow(qna) {
 document.all.qna1.style.display = "none";
 document.all.qna2.style.display = "none";
 var obj = eval("document.all." + qna);
 obj.style.display = "block";
}
//-->
</script>
<table align="center" id="qna1" cellspacing="0" width="100%"><tr><td>aaa</td></tr></table>
<table align="center" id="qna2" cellspacing="0" width="100%"><tr><td>bbb</td></tr></table>

그리고 또하나 계속 알아보고 있는데 해결이 안되네요
1:1게시판 리스트인데요 아래코드를 사용하면 번호가 나오지 않습니다. 혹 아시면...;;
/*******************************************************************************
*
* 1:1 게시판 기능을 위해서 추가된 부분 -
*
*******************************************************************************/
$noticeNumS = str_replace("\n",",",$board[bo_notice]);
$bb_query2 = "select * from `{$write_table}` where 1 and find_in_set(wr_id,'{$noticeNumS}') and wr_is_comment != 1 order by  wr_num, wr_reply;";
$result2 = sql_query($bb_query2);
$list2A = array();
while ($row = sql_fetch_array($result2))
{
$row = get_list($row, $board, $g5[path].'/skin/board/'.$board[bo_skin], $board[bo_subject_len]);
array_push($list2A, $row);
}

// 해당 사용자가 쓴 글의 번호를 얻어 옴.
$bb_query1 = "select * from `{$write_table}` where 1 and mb_id like '{$member[mb_id]}'";
$result1 = sql_query($bb_query1);
$list1A = array();
while ($row = sql_fetch_array($result1))
{
$list1S = $row[wr_num].",".$list1S;
//array_push($list1A, $row[wr_num]);
}


// 페이징 처리
$bb_query_total = "select * from `{$write_table}` where 1 and find_in_set(wr_num,'{$list1S}') and wr_is_comment != 1 order by  wr_num, wr_reply;";
$bb_result_total = sql_query($bb_query_total);
$bb_total_count = mysql_num_rows($bb_result_total);

$bb_total_page  = ceil($bb_total_count / $board[bo_page_rows]);  // 전체 페이지 계산
if (!$page) { $page = 0; } // 페이지가 없으면 첫 페이지 (1 페이지)
$bb_from_record = ($page - 1) * $board[bo_page_rows]; // 시작 열을 구함

$bb_url = "./board.php?bo_table={$board[bo_table]}&page=";
$bb_write_pages = get_paging( $board[bo_page_rows], $page, $bb_total_page, $bb_url, $add="");

// 공지글, 해당사용자가 쓴 글과 관련된 게시물 가져오기
$bb_query3 = "select * from `{$write_table}` where 1 and find_in_set(wr_num,'{$list1S}') and wr_is_comment != 1 order by  wr_num, wr_reply limit $bb_from_record, $board[bo_page_rows];";
$result3 = sql_query($bb_query3);
$list3A = array();
while ($row = sql_fetch_array($result3))
{
$row = get_list($row, $board, $g5[path].'/skin/board/'.$board[bo_skin], $board[bo_subject_len]);
array_push($list2A, $row);
}

if ( !$is_admin) {
$total_count = $bb_total_count;
$list = $list2A;
  $write_pages = $bb_write_pages;
}

/*******************************************************************************
*
* 1:1 게시판 기능을 위해서 추가된 부분 - 여기까지
*
*******************************************************************************/

답변을 작성하시기 전에 로그인 해주세요.
전체 71
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT