BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show map.htm Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download map.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.htm
  1. <HTML>
  2. <HEAD>
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  4. <script language=javascript src="dialog.js"></script>
  5. <link href='dialog.css' type='text/css' rel='stylesheet'>
  6. <TITLE>图形热点链接</TITLE>
  7.  
  8. <script language="javascript">
  9.  
  10. var oControl;
  11. var oSeletion;
  12. var sRangeType;
  13. var oMap = null;
  14.  
  15. var sSrc = "";
  16. var sUseMap = "";
  17. var sWidth = "";
  18. var sHeight = "";
  19.  
  20. var aHref = new Array();
  21. var aTarget = new Array();
  22. var aCoords = new Array();
  23.  
  24. var aLeft = new Array();
  25. var aTop = new Array();
  26. var aWidth = new Array();
  27. var aHeight = new Array();
  28.  
  29. var aMapName = new Array();
  30. var sBody = "";
  31.  
  32. oSelection = opener.eWebEditor.document.selection.createRange();
  33. oControl = oSelection.item(0);
  34.  
  35. sSrc = oControl.src;
  36. sUseMap = oControl.useMap;
  37. sWidth = oControl.offsetWidth;
  38. sHeight = oControl.offsetHeight;
  39. if (sUseMap!=""){
  40.         sUseMap = sUseMap.toUpperCase();
  41.         var oAllMap = opener.eWebEditor.document.body.getElementsByTagName("MAP");
  42.         for (var i=0; i<oAllMap.length; i++){
  43.                 aMapName[i] = oAllMap[i].name.toUpperCase();
  44.                 if (("#"+aMapName[i])==sUseMap){
  45.                         oMap = oAllMap[i];
  46.                 }
  47.         }
  48. }
  49.  
  50.  
  51. sBody = "<img id='SOURCEIMAGE' border=0 src='"+sSrc+"' width='"+sWidth+"' height='"+sHeight+"'>";
  52. if (oMap){
  53.         for (var i=0; i<oMap.areas.length; i++){
  54.                 aHref[i] = oMap.areas(i).href;
  55.                 aTarget[i] = oMap.areas(i).target;
  56.                 aCoords[i] = oMap.areas(i).coords;
  57.                 var a = aCoords[i].split(",");
  58.                 aLeft[i] = parseInt(a[0]);
  59.                 aTop[i] = parseInt(a[1]);
  60.                 aWidth[i] = parseInt(a[2])-aLeft[i];
  61.                 aHeight[i] = parseInt(a[3])-aTop[i];
  62.                 sBody += "<img id='myIMAGE"+i+"' border=1 src='../sysimage/space.gif' style='position:absolute;left:"+aLeft[i]+"px;top:"+aTop[i]+"px;width:"+aWidth[i]+"px;height:"+aHeight[i]+"px;zIndex:"+(i+1)+"'>";
  63.         }
  64. }
  65.  
  66.  
  67. function doInit(){
  68.  
  69.         mapIframe.document.designMode="On";
  70.         mapIframe.document.open();
  71.         mapIframe.document.write("<head><style>body,a,table,td {font-size:9pt;font-family:Verdana, Arial, Helvetica, sans-serif;Color:#000000;}</style></head><body MONOSPACE>");
  72.         mapIframe.document.body.innerHTML = sBody;
  73.         mapIframe.document.body.contentEditable = "true";
  74.         mapIframe.document.ondblclick=new Function("return dblClick(mapIframe.event);");
  75.        
  76.         mapIframe.document.execCommand("2D-Position",true,true);
  77.         //mapIframe.document.execCommand("MultipleSelection", true, true);
  78.         mapIframe.document.execCommand("LiveResize", true, true);
  79.         mapIframe.document.close();
  80.  
  81. }
  82.  
  83. var objLink = new Object() ;
  84. function dblClick(event){
  85.         var e=event.srcElement;
  86.         if (e){
  87.                 if ((e.tagName=="IMG")&&(e.id!="SOURCEIMAGE")){
  88.                         var sID = e.id;
  89.                         var nID = parseInt(sID.substr(7));
  90.                         objLink.Href = aHref[nID];
  91.                         objLink.Target = aTarget[nID];
  92.                         var arr = showModalDialog("hyperlink.htm?action=other", window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
  93.                         if (arr){
  94.                                 aHref[nID] = arr[0];
  95.                                 aTarget[nID] = arr[1];
  96.                         }
  97.                 }
  98.         }
  99.         return false;
  100. }
  101.  
  102. function newMap(){
  103.         var n = aHref.length;
  104.         aHref[n]="";
  105.         aTarget[n]="";
  106.         mapIframe.document.body.innerHTML += "<img id='myIMAGE"+n+"' border=1 src='../sysimage/space.gif' style='position:absolute;zIndex:"+(n+1)+";width:20;height:20;left:0;top:0'>";
  107.         mapIframe.scrollBy(0,0);
  108.         mapIframe.focus();
  109. }
  110.  
  111.  
  112. function getAutoMapName(){
  113.         var b=true;
  114.         var n=0;
  115.         var s=""
  116.         while (b){
  117.                 n++;
  118.                 s = "AutoMap" + n;
  119.                 if (isValidMapName(s)){
  120.                         b=false;
  121.                 }
  122.         }
  123.         return s;
  124.  
  125. }
  126.  
  127.  
  128. function isValidMapName(str){
  129.         str=str.toUpperCase();
  130.         for (var i=0; i<aMapName.length; i++){
  131.                 if (aMapName[i]==str){
  132.                         return false;
  133.                 }
  134.         }
  135.         return true;
  136. }
  137.  
  138. function ok(){
  139.         var b=false;
  140.         for (var i=0; i<aHref.length; i++){
  141.                 var obj = mapIframe.document.getElementById("myIMAGE"+i);
  142.                 if (obj){
  143.                         b=true;
  144.                 }
  145.         }
  146.  
  147.        
  148.         if (b){
  149.                 var html = "";
  150.                 for (var i=0; i<aHref.length; i++){
  151.                         var obj = mapIframe.document.getElementById("myIMAGE"+i);
  152.                         if (obj){
  153.                                 var nLeft = parseInt(obj.style.left);
  154.                                 var nTop = parseInt(obj.style.top);
  155.                                 var nWidth = parseInt(obj.style.width);
  156.                                 var nHeight = parseInt(obj.style.height);
  157.                                 var nRight = nLeft+nWidth;
  158.                                 var nBottom = nTop+nHeight;
  159.                                 html += "<area shape='rect' href='"+aHref[i]+"' target='"+aTarget[i]+"' coords='"+nLeft+","+nTop+","+nRight+","+nBottom+"'>";
  160.                         }
  161.                 }
  162.  
  163.                 if (oMap){
  164.                         oMap.innerHTML = html;
  165.                 }else{
  166.                         sUseMap = getAutoMapName();
  167.                         oControl.useMap = "#" + sUseMap;
  168.                         opener.appendHTML("<map name='"+sUseMap+"'>"+html+"</map>");
  169.                 }
  170.         }else{
  171.                 if (oMap){
  172.                         oMap.outerHTML = "";
  173.                 }
  174.                 oControl.useMap = "";
  175.         }
  176.         oControl.width=mapIframe.SOURCEIMAGE.width;
  177.         oControl.height=mapIframe.SOURCEIMAGE.height;
  178.  
  179.         window.returnValue = null;
  180.         window.close();
  181. }
  182.  
  183. function InitDocument(){
  184.  
  185. }
  186.  
  187. </script>
  188.  
  189. </HEAD>
  190.  
  191. <BODY onload="InitDocument()">
  192. <table border=0 cellpadding=0 cellspacing=3 align=center width="100%" height="100%">
  193. <tr><td colspan=2 height="100%"><iframe ID="mapIframe" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" scrolling="yes" height="100%"></iframe></td></tr>
  194. <tr><td colspan=2 height=5></td></tr>
  195. <tr><td><input type=button value='新建' id=btnNew onclick="newMap()">&nbsp;(双击可编辑链接)</td><td align=right><input type=button value='确定' id=Ok onclick="ok()">&nbsp;&nbsp;<input type=button value='取消' onclick="window.close();"></td></tr>
  196. </table>
  197.  
  198. <Script Language=JavaScript>
  199. doInit();
  200. </Script>
  201.  
  202. </body>
  203. </html>
  204.  
downloadmap.htm 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