123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@ page language="java" %>
- <html>
- <head>
- <style>
- BODY {
- scrollbar-face-color: #ffffff;
- scrollbar-highlight-color: #e0e0e0;
- scrollbar-3dlight-color: #ffffff;
- scrollbar-shadow-color: #e0e0e0;
- scrollbar-darkshadow-color: #ffffff;
- scrollbar-track-color: #ffffff;
- scrollbar-arrow-color: #919191;
- margin-left: 0px;
- margin-top: 0px;
- }
- TD { FONT-SIZE:12px; COLOR:#686868; FONT-FAMILY:돋움,Arial ; line-height: 16px; align:left; }
- select, input, textarea {color:#404040; font-family:돋움; font-size:12px; padding-top:2; line-height:16px }
- </style>
- <script language="javascript" src="../js/awtAjax.js"></script>
- <script language="javascript">
-
- var AwtTFMain = null;
- var AwtMode = null;
-
- function AwtSearchOne(AwtAjaxUrl, sendWord) {
- AwtMode = "matchone";
- xmlHttpPost();
- send(AwtAjaxUrl, sendWord, AwtMode);
- }
- function AwtSearchLike(AwtAjaxUrl, sendWord)
- {
- AwtMode = "autocomplete";
- frmSearch.sword.value = sendWord;
- xmlHttpPost();
- send(AwtAjaxUrl, sendWord, AwtMode);
- }
-
- function OnResult(strVal)
- {
- nCurrent=0;
- strVal = strVal.replace(/\r\n/g,"");
- if(AwtMode=="matchone")
- {
- AwtResult = strVal;
- if (AwtTFMain != null) {
- if (AwtResult.length != 0 && AwtResult != "null") {
- AwtTFMain.parent.window.javascript.AwtSetResult(AwtResult, AwtMode);
- }
- } else {
- //alert("'AwtBrowser::DocumentComplete'(Init 함수)가 호출되지 않았습니다.");
- }
- }
- else if(AwtMode=="autocomplete")
- {
- for (var i = parseInt(document.all.cnt.value) - 1; i >= 0 ; i--) {
- AwtListTable.deleteRow(i);
- }
-
- var tblCnts = "";
- if(strVal.length>0 && strVal.indexOf("■■■")>=0)
- {
- var strArr = strVal.split("■■■");
- document.all.cnt.value = strArr.length - 1;
- for (var i = 0; i < strArr.length; i++) {
- if (strArr[i] != '') {
- var strCol = strArr[i].split("□□□");
- var strData = strCol[0];
- var strShow = strCol[1];
-
- var row = AwtListTable.insertRow();
- var col = row.insertCell();
- col.height = 18;
- col.width = 12;
- col.setAttribute("id", "id_1_" + i);
- col.setAttribute("seq", i);
- if (i == 0)
- col.innerHTML = "<input type='radio' name='nm_1rdo' id='id_1rdo_" + i + "' checked/>";
- else
- col.innerHTML = "<input type='radio' name='nm_1rdo' id='id_1rdo_" + i + "'/>";
- col.onkeydown = function () {if (event.keyCode == 32 || event.keyCode == 13) {event.keyCode = 0;setResult();return;} if (event.keyCode == 27) hideThis();}
-
- col = row.insertCell();
- col.setAttribute("id", "id_2_" + i);
- col.setAttribute("data", strData);
- col.setAttribute("seq", i);
- col.innerHTML = strShow;
- col.onclick = function () {var a = document.getElementById('id_1rdo_' + this.seq); a.checked = true; setResult();}
- col.style.cssText ="FONT-SIZE:12px; border:1px solid #d8d8d8; COLOR:#000000; FONT-FAMILY:돋움,Arial ; align:left; ";
- col.innerHTML = strShow;
- }
- }
-
- if (AwtTFMain != null)
- AwtTFMain.parent.window.javascript.AwtShow();
- else {
- //alert("'AwtBrowser::DocumentComplete'(Init 함수)가 호출되지 않았습니다.");
- }
- }
- }
- }
-
- function focus() {
- frmSearch.sword.focus();
- }
-
- function setWordMouse()
- {
- setResult();
- }
-
- function setWordKey()
- {
- if (event.keyCode == 27 || event.keyCode == 13) {
- if (AwtTFMain != null)
- AwtTFMain.parent.window.javascript.AwtHide();
- else {
- //alert("'AwtBrowser::DocumentComplete'(Init 함수)가 호출되지 않았습니다.");
- }
- }
-
- if (event.keyCode == 32 || event.keyCode == 13) {
- event.keyCode = 0;
- setResult();
- }
- }
-
- function setResult() {
- if (document.all.cnt.value == "0")
- return;
-
- var selvalue = "";
- var selctl = null;
- var ctls = document.getElementsByName("nm_1rdo");
- for (var i = 0; i < ctls.length; i++) {
- if (ctls[i].checked) {
- selctl = document.getElementById('id_2_' + i);
- break;
- }
- }
-
- if (selctl == null)
- return;
-
- selvalue = selctl.data;
-
- if (AwtTFMain != null)
- AwtTFMain.parent.window.javascript.AwtHide();
-
- if (AwtTFMain != null) {
- AwtTFMain.parent.window.javascript.AwtSetResult(selvalue, AwtMode);
- } else {
- //alert("'AwtBrowser::DocumentComplete'(Init 함수)가 호출되지 않았습니다.");
- }
- }
-
- function hideThis() {
- if (AwtTFMain != null)
- AwtTFMain.parent.window.javascript.AwtHide();
- else {
- //alert("'AwtBrowser::DocumentComplete'(Init 함수)가 호출되지 않았습니다.");
- }
- }
-
- function search() {
- if (frmSearch.sword.value.length == 0) {
- alert('검색할 단어를 입력하세요');
- frmSearch.sword.focus();
- return false;
- }
-
- AwtSearchLike('./awtAjaxOra.jsp', frmSearch.sword.value);
- return false;
- }
-
- function doKey() {
- if (event.keyCode == 27) {
- hideThis();
- }
- if (event.keyCode == 40) {
- if (document.all.cnt.value != "0")
- document.getElementById("id_1rdo_0").focus();
- }
- }
- </script>
- </head>
- <body bgcolor="#d8f8f8" style="overflow-y:hidden; overflow-x:hidden;">
- <table width="240px" height="220px" border="0px" style="padding:0px">
- <form name="frmSearch" method="post" onsubmit="return search()">
- <tr>
- <td width="70px"><font size="2">검색어 :</font></td>
- <td width="150px"><input type="text" name="sword" style="width:150px;height:21px" onKeyUp="doKey()"/></td>
- <td width="17px" align="right"><input type="image" src="../images/b_brdSch.gif"/><input type="hidden" name="cnt" value="0"/></td>
- </tr>
- </form>
- <tr>
- <td colspan="3" width="240px">
- <div style="width:240px; height:190px; overflow-y:auto; overflow-x:auto; padding=0;">
- <table id='AwtListTable' cellspacing='0' style="width:228px; height:190px;"></table>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="3" width="240px">
- <table style="width:240px;"><tr><td align="center">
- <img src="../images/btnSelectWord.gif" onClick="setWordMouse()"><img src="../images/btnCancelWord.gif" onClick="hideThis()">
- </td></tr></table>
- </td>
- </tr>
- </table>
- </body>
- </html>
|