0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
marketting
/
js
/
scripts
/
[
Home
]
File: form_check.htm
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="style/editor.css" rel="stylesheet" type="text/css"> <script> var sLangDir=window.opener.oUtil.langDir; document.write("<scr"+"ipt src='language/"+sLangDir+"/form_check.js'></scr"+"ipt>"); </script> <script>writeTitle()</script> <script> function GetElement(oElement,sMatchTag) { while (oElement!=null&&oElement.tagName!=sMatchTag) { if(oElement.tagName=="BODY")return null; oElement=oElement.parentElement; } return oElement; } function doWindowFocus() { window.opener.oUtil.onSelectionChanged=new Function("realTime()"); } function bodyOnLoad() { window.onfocus=doWindowFocus; window.opener.oUtil.onSelectionChanged=new Function("realTime()"); realTime() } function realTime() { if(!window.opener.oUtil.obj.checkFocus()){return;}//Focus stuff var oEditor=window.opener.oUtil.oEditor; var oSel=oEditor.document.selection.createRange(); if (oSel.parentElement) oEl=GetElement(oSel.parentElement(),"INPUT"); else oEl=GetElement(oSel.item(0),"INPUT"); if (oEl) { if(oEl.type=="checkbox") { btnInsert.style.display="none"; btnApply.style.display="block"; btnOk.style.display="block"; if(oEl.NAME)inpName.value=oEl.NAME; if(oEl.name)inpName.value=oEl.name; if(oEl.value) inpValue.value=oEl.value; if(oEl.checked) inpState.value="checked"; else inpState.value="unchecked"; } } else { btnInsert.style.display="block"; btnApply.style.display="none"; btnOk.style.display="none"; inpName.value="checkbox1"; inpValue.value=""; inpState.value="unchecked"; } } function doApply() { if(!window.opener.oUtil.obj.checkFocus()){return;}//Focus stuff var oEditor=window.opener.oUtil.oEditor; var oSel=oEditor.document.selection.createRange(); window.opener.oUtil.obj.saveForUndo(); if (oSel.parentElement) oEl=GetElement(oSel.parentElement(),"INPUT"); else oEl=GetElement(oSel.item(0),"INPUT"); if (oEl) { if(oEl.type=="checkbox") { if(oEl.NAME) oEl.NAME=inpName.value; else if(oEl.name) //else if(oEl.name) oEl.name=inpName.value; { oEl.removeAttribute("name",0); oEl.NAME=inpName.value; } else oEl.NAME=inpName.value; if(inpValue.value!="") oEl.value=inpValue.value; if(inpState.value=="checked") oEl.checked=true; else oEl.checked=false; } } else { oSel.execCommand("InsertInputCheckbox"); oSel = oEditor.document.selection.createRange() oEl=GetElement(oSel.item(0),"INPUT"); if (oEl) { if(oEl.NAME) oEl.NAME=inpName.value; else if(oEl.name) //else if(oEl.name) oEl.name=inpName.value; { oEl.removeAttribute("name",0); oEl.NAME=inpName.value; } else oEl.NAME=inpName.value; if(inpValue.value!="") oEl.value=inpValue.value; if(inpState.value=="checked") oEl.checked=true; } } realTime(); window.opener.realTime(window.opener.oUtil.oName); window.opener.oUtil.obj.selectElement(0); } </script> </head> <body onload="loadTxt();bodyOnLoad()" style="overflow:hidden;"> <table width=100% height=100% align=center cellpadding=0 cellspacing=0> <tr> <td valign=top style="padding:5;height:100%"> <table width=100%> <tr> <td nowrap><span id=txtLang name=txtLang>Name</span>: </td> <td width=100%><INPUT type="text" ID="inpName" NAME="inpName" style="width:100%;padding-left:2" value="checkbox1" class="inpTxt"></td> </tr> <tr> <td nowrap><span id=txtLang name=txtLang>Value</span>: </td> <td><INPUT type="text" ID="inpValue" NAME="inpValue" style="width:100%;padding-left:2" class="inpTxt"></td> </tr> <tr> <td nowrap><span id=txtLang name=txtLang>Default</span>: </td> <td> <select ID="inpState" NAME="inpState" style="width:100%" class="inpSel"> <option value="checked" id="optLang" name="optLang">Checked</option> <option value="unchecked" id="optLang" name="optLang" selected>Unchecked</option> </select></td> </tr> </table> </td> </tr> <tr> <td class="dialogFooter" style="padding:6;" align="right"> <table cellpadding=1 cellspacing=0> <td> <input type=button name=btnCancel id=btnCancel value="cancel" onclick="self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'"> </td> <td> <input type=button name=btnInsert id=btnInsert value="insert" onclick="doApply();self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'"> </td> <td> <input type=button name=btnApply id=btnApply value="apply" style="display:none" onclick="doApply()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'"> </td> <td> <input type=button name=btnOk id=btnOk value=" ok " style="display:none;" onclick="doApply();self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'"> </td> </table> </td> </tr> </table> </body> </html>