/**
* 조회된 데이터 별 테이블 생성
*/
function addTableOfsearch() {
var targetTable = document.all.IGTABLE;
var insertRowindex = targetTable.rows.length;
var cur_row = targetTable.insertRow(insertRowindex);
var rowNumber = insertRowindex + 1;
var innerTag;
var innerTag;
cur_row.className = "trN"; //tr
cur_cell = cur_row.insertCell(); //td
innerTag = "<table cellpadding='0' cellspacing='0' width='300' bgcolor='#CCC7C5'>"
+ "<tr>"
+ "<td>"
+ "<table cellpadding='0' cellspacing='1' width='330' class='n_t3'>"
+ "<colgroup>"
+ "<col width='55'>"
+ "<col width='55'>"
+ "<col width='55'>"
+ "<col width='55'>"
+ "<col width='55'>"
+ "<col width='55'>"
+ "<colgroup>"
+ "<tr bgcolor='#FFFFFF'>"
+ "<td align='center'>"
+ "작성"
+ "</td>"
+ "<td align='center'>"
+ "접수대기"
+ "</td>"
+ "<td align='center'>"
+ "접수"
+ "</td>"
+ "<td align='center'>"
+ "상담"
+ "</td>"
+ "<td align='center'>"
+ "상담완료"
+ "</td>"
+ "<td align='center'>"
+ "매각"
+ "</td>"
+ "</tr>"
+ "</table>";
+ "</td>"
+ "</tr>"
+ "</table>";
cur_cell.innerHTML = innerTag;
cur_cell.align = 'center';
cur_cell.style.backgroundColor = '#f8fbfc';
cur_cell.style.paddingTop = 0;
cur_cell = cur_row.insertCell(); //td
cur_cell.innerHTML = "<span id='MGRP_CD_" + rowNumber + "_ETC_CODE' style=\"display:''\">"
+ "<select name='MGRP_CD_" + rowNumber + "' onchange='checkEtc(this, " + rowNumber + ");' style='width:98%;'><option value=''>중분류</option></select>"
+ "</span>"
+ "<span id='MGRP_CD_" + rowNumber + "_ETC_TEXT' style='display:none'>"
+ "<input type='text' name='MGRP_ETC_" + rowNumber + "' class='input_box2' size='18'>"
+ "</span>"
cur_cell.align = 'center';
cur_cell.style.backgroundColor = '#f8fbfc';
cur_cell.style.paddingTop = 0;
cur_cell = cur_row.insertCell(); //td
cur_cell.innerHTML = "수량";
cur_cell.align = 'center';
cur_cell.style.backgroundColor = '#f8fbfc';
cur_cell.style.width = '50';
cur_cell.style.paddingTop = 0;
cur_cell = cur_row.insertCell(); //td
cur_cell.innerHTML = "<select name='ITM_QTY_" + rowNumber + "' style='width:70%;'>"
+ "<option value=''>선 택</option>"
+ itmQty
+ "</select>";
cur_cell.align = 'left';
cur_cell.style.backgroundColor = '#f8fbfc';
cur_cell.style.paddingTop = 0;
cur_cell = cur_row.insertCell(); //td
cur_cell.innerHTML = "<input type=hidden name='MGMT_SN_" + rowNumber + "'>";
/**
* 신청품목 생성
* 이전의 콤보 정보를 복사 한다.
*/
var igCd = document.getElementById("IG_CD_" + (rowNumber-1));
var igCdNext = document.getElementById("IG_CD_" + rowNumber);
var igLength = igCd.options.length;
for( var i=0; i<igLength; i++ ) {
igCdNext.options.add( new Option( igCd.options[i].text, igCd.options[i].value ) );
}
}
'JavaScript' 카테고리의 다른 글
[JavaScript] 숫자 3자리수마다 콤마 표시 (0) | 2012.05.07 |
---|---|
[JavaScript] Math 올림,반올림,버림 (0) | 2012.04.10 |
[JavaScript] 자릿수 0으로 채우기 (0) | 2012.03.16 |
[JavaScript] JSON(JavaScript Object Notation) 개요 (0) | 2012.03.06 |
[JavaScript] substring, substr (0) | 2011.11.28 |