BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show webdrop.js Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download webdrop.js Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.js
  1. /***********************************************************
  2.   Copyright  2007, Yusuf Wiryonoputro. All rights reserved.
  3. ************************************************************/
  4.  
  5. var oUtil=new webUtil();
  6. function webUtil()
  7.   {
  8.   this.arrWebDrop=[];
  9.   }
  10.  
  11. var oActiveBox;
  12. function dropShow(oEl,box)
  13.   {
  14.   if(box.style.display=="block")
  15.     {
  16.     box.style.display="none";
  17.     return;
  18.     }
  19.   hide();
  20.  
  21.   if(eval("document.all.inp"+this.oName).value!=eval("document.all.sel"+this.oName).value)
  22.     {
  23.     eval("document.all.sel"+this.oName).selectedIndex=-1
  24.     }
  25.   for(var i=0;i<eval("document.all.sel"+this.oName).options.length;i++)
  26.     {
  27.     if(eval("document.all.inp"+this.oName).value==eval("document.all.sel"+this.oName).options[i].innerHTML)
  28.       {
  29.       eval("document.all.sel"+this.oName).selectedIndex=i;
  30.       }
  31.     }
  32.  
  33.   var nTop=0;
  34.   var nLeft=0;
  35.  
  36.   oElTmp=oEl;
  37.   while(oElTmp.tagName!="BODY" )
  38.     {
  39.     if(oElTmp.style.top!="")
  40.       nTop+=oElTmp.style.top.substring(1,oElTmp.style.top.length-2)*1;
  41.     else nTop+=oElTmp.offsetTop;
  42.     oElTmp = oElTmp.offsetParent;
  43.     }
  44.  
  45.   oElTmp=oEl;
  46.   while(oElTmp.tagName!="BODY" && oElTmp.tagName!="HTML")
  47.     {
  48.     if(oElTmp.style.left!="")
  49.       nLeft+=oElTmp.style.left.substring(1,oElTmp.style.left.length-2)*1;
  50.     else nLeft+=oElTmp.offsetLeft;
  51.     oElTmp=oElTmp.offsetParent;
  52.     }
  53.  
  54.   box.style.left=nLeft-this.width;
  55.   box.style.top=nTop+this.height;
  56.  
  57.   box.style.display="block";
  58.  
  59.   oActiveBox=box;
  60.   }
  61. function hide()//independent
  62.   {
  63.   if(oActiveBox)oActiveBox.style.display="none";
  64.   }
  65.  
  66. function webDrop(oName)
  67.   {
  68.   this.oName=oName;
  69.   this.size;
  70.   this.width=140;//120
  71.   this.height=17;
  72.   this.arrValue=[];
  73.   this.arrCaption=[];
  74.   //this.onChange=function(){return true;};
  75.   this.onChange=new Function("preview()");
  76.   this.getValue=getValue;
  77.   this.setValue=setValue;
  78.   this.dropShow=dropShow;
  79.   this.render=render;
  80.   this.focus=focus;
  81.   this.defaultValue=0;
  82.   this.pickValue=pickValue;
  83.   }
  84. function getValue()
  85.   {
  86.   return eval("inp"+this.oName).value;
  87.   }
  88. function setValue(sValue)
  89.   {
  90.   eval("inp"+this.oName).value=sValue;
  91.   }
  92. function render()
  93.   {
  94.   if(this.arrValue.length>0&&this.arrCaption.length==0)
  95.     this.arrCaption=this.arrValue;
  96.   if(this.arrValue.length>=12)this.size=12;
  97.   else this.size=this.arrValue.length;
  98.  
  99.   var s="";
  100.   s+="<table cellpadding=0 cellspacing=0><tr><td>"+
  101.     "<input type=text onfocus=\"this.select()\" onkeyup=\""+this.oName+".onChange();\" onblur=\""+this.oName+".onChange();\" name=inp"+this.oName+" style='border:#d4d0c8 1px solid;padding-left:3px;width:"+this.width+";height:"+this.height+"' onclick=\"hide()\" value=\""+this.defaultValue+"\">"+
  102.     "</td><td>"+
  103.     "<input type=button style='cursor:default;border:none;background:url(dropbtn.gif);width:13;height:"+this.height+";' onclick=\""+this.oName+".dropShow(this,div"+this.oName+")\" onblur=\"hide();\" >"+
  104.     "<div id=div"+this.oName+" style=\"display:none;position:absolute;\"><select name=sel"+this.oName+" multiple=multiple size="+this.size+" style='border:#000000 1px solid;width:"+(this.width+13)+";' onchange=\"hide();"+this.oName+".pickValue();"+this.oName+".onChange();\" >";
  105.   for(var i=0;i<this.arrValue.length;i++)
  106.     {
  107.     s+="<option value=\""+this.arrValue[i]+"\">"+this.arrCaption[i]+"</option>";
  108.     }
  109.   s+="</select></div></td></tr></table>";
  110.   document.write(s);
  111.  
  112.   oUtil.arrWebDrop.push(this.oName)
  113.   }
  114. function pickValue()
  115.   {
  116.   if(eval("document.all.sel"+this.oName).value=="<length>")
  117.     {
  118.     eval("inp"+this.oName).value=modalDialogShow("length.htm",186,123)
  119.     }
  120.   else if(eval("document.all.sel"+this.oName).value=="<percentage>")
  121.     {
  122.     eval("inp"+this.oName).value=modalDialogShow("percent.htm",186,123)
  123.     }
  124.   else if(eval("document.all.sel"+this.oName).value=="<color>")
  125.     {
  126.     if(eval("document.all.inp"+this.oName).name=="inpoColor")
  127.       oColor1.show(eval("document.all.inp"+this.oName));
  128.     if(eval("document.all.inp"+this.oName).name=="inpoBackgroundColor")
  129.       oColor2.show(eval("document.all.inp"+this.oName));
  130.     if(eval("document.all.inp"+this.oName).name=="inpoBorderColor")
  131.       oColor3.show(eval("document.all.inp"+this.oName));
  132.     if(eval("document.all.inp"+this.oName).name=="inpoBorderTopColor")
  133.       oColor4.show(eval("document.all.inp"+this.oName));
  134.     if(eval("document.all.inp"+this.oName).name=="inpoBorderBottomColor")
  135.       oColor5.show(eval("document.all.inp"+this.oName));
  136.     if(eval("document.all.inp"+this.oName).name=="inpoBorderLeftColor")
  137.       oColor6.show(eval("document.all.inp"+this.oName));
  138.     if(eval("document.all.inp"+this.oName).name=="inpoBorderRightColor")
  139.       oColor7.show(eval("document.all.inp"+this.oName));
  140.     }
  141.   else if(eval("document.all.sel"+this.oName).value=="<url>")
  142.     {
  143.     eval("inp"+this.oName).value=modalDialogShow2("url.htm",250,120)
  144.     }
  145.   else
  146.     {
  147.     eval("document.all.inp"+this.oName).value=eval("document.all.sel"+this.oName).value;
  148.     }
  149.   }
  150. function modalDialogShow(url,width,height)
  151.   {
  152.   var vRetVal=window.showModalDialog(url,window,
  153.     "dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:1;help:0;resizable:1;maximize:1");
  154.   if(vRetVal)return vRetVal;
  155.   else return "";
  156.   }
  157. function modalDialogShow2(url,width,height)
  158.   {
  159.   var vRetVal=window.showModalDialog(url,dialogArguments,
  160.     "dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:1;help:0;resizable:1;maximize:1");
  161.   if(vRetVal)return vRetVal;
  162.   else return "";
  163.   }
  164. function focus()
  165.   {
  166.   eval("document.all.inp"+this.oName).focus();
  167.   }
downloadwebdrop.js Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code
Related Source Codes/Software:
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
C9 v2.1.1 static post system - Program USES ASP + ACC structure design and develo... 2016-09-21
Imitation green download station perfect version - Before increased | software home page, on the basi... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top