SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Close text link

  1. #1
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Close text link

    I have a dhtml popup and I want to put a text link that when clicked closes this dhtml popup.

    How can I do that?

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,608
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Is the popup a window or a <div> ?
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't understand what you mean by that. All I know is that it is a dhtml popup.

  4. #4
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,608
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    DHTML popups are often just <div> tags which have their visibility toggled between show and hide. However your popup here might actually be a physical window, opened via a window.open() function call.

    The answer to your question depends on the method being used. Only way we can determine this is if you show us some code for what you're using.
    Ian Anderson
    www.siteguru.co.uk

  5. #5
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My code is below:

    Code:
    <script type="text/javascript" language="Javascript">
    var v1c0747cc28;var v1d0747cc28;var v1e0747cc28;var v1f0747cc28;var v200747cc28;var v210747cc28;var v220747cc28;var v230747cc28;var v240747cc28;var v250747cc28;var v260747cc28;var v270747cc28;var v280747cc28;var v290747cc28;var v2a0747cc28;var v2b0747cc28;function CloseDPG_o9857f97fef(){v1d0747cc28();}var v2c0747cc28=0;function v2d0747cc28(){return document.charset?true:false;}function v2e0747cc28(){return navigator.userAgent.indexOf("Firefox")!=-1;}function v2f0747cc28(){return navigator.userAgent.indexOf("Netscape")!=-1;}var v300747cc28=document.createElement('SPAN');v300747cc28.style.width  ='324px';v300747cc28.style.height ='334px';v300747cc28.style.position='absolute';v300747cc28.style.overflow='hidden';v300747cc28.style.left=-324-100+'px';v300747cc28.style.top ='0px';v300747cc28.style.backgroundColor='#000000';v300747cc28.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=20)";v300747cc28.style.MozOpacity=20 / 100;v300747cc28.style.zIndex=98;v300747cc28=document.body.appendChild(v300747cc28);var v310747cc28=true;var v320747cc28=document.createElement('SPAN');v320747cc28.style.position='absolute';v320747cc28.v330747cc28=-3000;v320747cc28.v340747cc28=0;v320747cc28.style.left=v320747cc28.v330747cc28+'px';v320747cc28.style.top =v320747cc28.v340747cc28+'px';v320747cc28.style.borderStyle='none';v320747cc28.style.borderWidth='0px';var v350747cc28 =document.createElement('IFRAME');v350747cc28.style.width ='320px';v350747cc28.style.height='330px';v350747cc28.v360747cc28=320;v350747cc28.v370747cc28=330;v350747cc28.style.borderStyle='none';v350747cc28.style.borderWidth='0px';v350747cc28.scrolling='no';v350747cc28.frameBorder='0';v320747cc28=document.body.appendChild(v320747cc28);v350747cc28=v320747cc28.appendChild(v350747cc28);var v380747cc28=document.all?v320747cc28:v350747cc28;v320747cc28.style.zIndex=99;v380747cc28.style.borderStyle='Solid';v380747cc28.style.borderColor='#0000A0';v380747cc28.style.borderWidth='2px';var v390747cc28=false;var v3a0747cc28=null;v3a0747cc28=v3b0747cc28(v350747cc28);var v3c0747cc28='<BODY scroll=\'no\' style=\'margin:0px;background-color:transparent\'><IFRAME id=\'v3d0747cc28\' src=\'http://www.access-programmers.co.uk/popups/popup2.html\' onLoad=\'javascript:if(!document.charset)this.style.backgroundColor="white";\' scrolling=\'no\' frameborder=\'0\' style=\'width:100%;height:100%;position:absolute;border-style:none \'></IFRAME></BO\'+\'DY>';var v3e0747cc28=/v3f0747cc28/;if(!v2d0747cc28())v3c0747cc28=v3c0747cc28.replace(v3e0747cc28,'');v3a0747cc28.write(v3c0747cc28);v3a0747cc28.close();var v400747cc28;var v410747cc28;v420747cc28();function v3b0747cc28(v430747cc28){return v430747cc28.Document?v430747cc28.Document:v430747cc28.contentDocument?v430747cc28.contentDocument:v430747cc28.contentWindow.document;}function v420747cc28(){if(!v3a0747cc28.body){setTimeout('v420747cc28();',50);return;}v3a0747cc28.onselectstart=new Function('return false;');v3a0747cc28.ondragstart  =new Function('return false;');v3a0747cc28.oncontextmenu=new Function('return false;');v320747cc28.onmousedown=v440747cc28;v3a0747cc28.onmousedown=v440747cc28;v400747cc28=v3a0747cc28.getElementById('v3d0747cc28');v400747cc28.allowTransparency=true;if(typeof(v450747cc28)!='undefined')setTimeout('v450747cc28();',0);}function v440747cc28(){if(window.PTKAtFront&&window.PTKAtFront !=v460747cc28)PTKAtFront();window["PTKAtFront"]=v460747cc28;v320747cc28.style.zIndex=1;if(v300747cc28)v300747cc28.style.zIndex=1;}function v460747cc28(){v320747cc28.style.zIndex=0;if(v300747cc28)v300747cc28.style.zIndex=0;}function v470747cc28(){var v480747cc28=v3a0747cc28.getElementById('v490747cc28');var v4a0747cc28=v480747cc28.innerHTML;var v4b0747cc28=v4a0747cc28.indexOf('<',24)-24;var v4c0747cc28=v4a0747cc28.substr(0,24);var v4d0747cc28,v4e0747cc28;var v4f0747cc28;v4e0747cc28=0;
    for(v4d0747cc28=0;v4d0747cc28<v4c0747cc28.length;v4d0747cc28++)v4e0747cc28+=v4c0747cc28.charCodeAt(v4d0747cc28);v4e0747cc28=2276;v4b0747cc28=2;if(v4e0747cc28 !=2276||v4b0747cc28>2){v4f0747cc28='v3a0747cc28.getElementById("v490747cc28").pa';v4f0747cc28+='rent';v4f0747cc28+='Node.rem';v4f0747cc28+='oveCh';v4f0747cc28+='ild(v3a0747cc28.getElementById("v490747cc28"))';setTimeout(v4f0747cc28,0);}}function v500747cc28(){var v510747cc28=v3a0747cc28.getElementById('v3d0747cc28');var v4a0747cc28=v510747cc28.src;v4a0747cc28=v4a0747cc28.toLowerCase();v4e0747cc28=0;if(v4a0747cc28.length>0&&v4a0747cc28.charAt(v4a0747cc28.length-1)=='/')v4a0747cc28=v4a0747cc28.substring(0,v4a0747cc28.length-1);
    for(v4d0747cc28=0;v4d0747cc28<v4a0747cc28.length;v4d0747cc28++)v4e0747cc28+=v4a0747cc28.charCodeAt(v4d0747cc28);if(v4e0747cc28 !=5269){v4f0747cc28="v3a0747cc28.getElementById('v3d0747cc28').parent";v4f0747cc28+="Node.rem";v4f0747cc28+="oveChi";v4f0747cc28+="ld(v3a0747cc28.getElementById('v3d0747cc28'))";setTimeout(v4f0747cc28,0);}}function v520747cc28(v530747cc28,v540747cc28){v320747cc28.style.display='';if(v300747cc28)v300747cc28.style.display='';v1e0747cc28(v530747cc28,v540747cc28);return true;}function v550747cc28(){v390747cc28=true;v320747cc28.style.display='none';if(v300747cc28)v300747cc28.style.display='none';}function v560747cc28(v530747cc28,v540747cc28){v530747cc28=Math.round(parseFloat(v530747cc28));v540747cc28=Math.round(parseFloat(v540747cc28));v320747cc28.v330747cc28=v530747cc28;v320747cc28.v340747cc28=v540747cc28;var v570747cc28=v580747cc28();var v590747cc28=v5a0747cc28();v320747cc28.style.left=v530747cc28+v570747cc28+'px';v320747cc28.style.top =v540747cc28+v590747cc28+'px';if(v300747cc28){var v5b0747cc28=v240747cc28();var v5c0747cc28=v250747cc28();var v5d0747cc28=v2a0747cc28();var v5e0747cc28=v2b0747cc28();var v5f0747cc28,v600747cc28;if(v310747cc28&&v5d0747cc28-v530747cc28-v5b0747cc28<5)v5f0747cc28=v5d0747cc28-v530747cc28-5;else v5f0747cc28=v5b0747cc28;if(v310747cc28&&v5e0747cc28-v540747cc28-v5c0747cc28<5)v600747cc28=v5e0747cc28-v540747cc28-5;else v600747cc28=v5c0747cc28;v300747cc28.style.width =(v5f0747cc28<0?0:v5f0747cc28)+'px';v300747cc28.style.height=(v600747cc28<0?0:v600747cc28)+'px';v300747cc28.style.left=v530747cc28+v570747cc28+5+'px';v300747cc28.style.top =v540747cc28+v590747cc28+5+'px';}}function v610747cc28(v5f0747cc28,v600747cc28){v5f0747cc28=parseInt(v5f0747cc28);v600747cc28=parseInt(v600747cc28);v350747cc28.style.width =v5f0747cc28+'px';v350747cc28.style.height=v600747cc28+'px';v1e0747cc28(v280747cc28(),v290747cc28());}function v620747cc28(){return parseInt(v350747cc28.style.width);}function v630747cc28(){return parseInt(v350747cc28.style.height);}function v640747cc28(){return v350747cc28.v360747cc28;}function v650747cc28(){return v350747cc28.v370747cc28;}function v660747cc28(){return parseInt(v350747cc28.style.width)+parseInt(v380747cc28.style.borderWidth)*2;}function v670747cc28(){return parseInt(v350747cc28.style.height)+parseInt(v380747cc28.style.borderWidth)*2;}function v680747cc28(){var v530747cc28;v530747cc28=(v2a0747cc28()-324)/ 2;return v530747cc28;}function v690747cc28(){var v540747cc28;v540747cc28=(v2b0747cc28()-334)/ 2;if(v540747cc28<0)v540747cc28=0;return v540747cc28;}function v6a0747cc28(){return v320747cc28.v330747cc28;}function v6b0747cc28(){return v320747cc28.v340747cc28;}function v6c0747cc28(){if(document.documentElement)if(v2f0747cc28())if(document.body.scrollWidth==document.documentElement.scrollWidth)return document.body.clientWidth;else return document.documentElement.clientWidth;else return Math.max(document.body.clientWidth,document.documentElement.clientWidth);else return document.body.clientWidth;}function v6d0747cc28(){if(document.documentElement)if(v2d0747cc28()&&document.documentElement.clientHeight==0||v2f0747cc28()&&document.body.scrollWidth==document.documentElement.scrollWidth||v2e0747cc28()&&document.body.clientWidth==document.documentElement.clientWidth)return document.body.clientHeight;else return document.documentElement.clientHeight;else return document.body.clientHeight;}function v580747cc28(){if(document.all)if(document.documentElement&&document.documentElement.scrollLeft)return document.documentElement.scrollLeft;else return document.body.scrollLeft;else return window.pageXOffset;}function v5a0747cc28(){if(document.all)if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;else return document.body.scrollTop;else return window.pageYOffset;}v1c0747cc28=v520747cc28;v1d0747cc28=v550747cc28;v1e0747cc28=v560747cc28;v1f0747cc28=v610747cc28;v200747cc28=v620747cc28;v210747cc28=v630747cc28;v220747cc28=v640747cc28;v230747cc28=v650747cc28;v240747cc28=v660747cc28;v250747cc28=v670747cc28;v260747cc28=v680747cc28;v270747cc28=v690747cc28;v280747cc28=v6a0747cc28;v290747cc28=v6b0747cc28;v2a0747cc28=v6c0747cc28;v2b0747cc28=v6d0747cc28;function v6e0747cc28(){if(!v1c0747cc28(v260747cc28(),v270747cc28()))return;}function v6f0747cc28(){v1d0747cc28();}var v700747cc28=false;if(v2c0747cc28==0)v710747cc28();function v710747cc28(){if(!v700747cc28)v1e0747cc28(v280747cc28(),v290747cc28());setTimeout('v710747cc28();',100);}function v720747cc28(v730747cc28,v740747cc28,v750747cc28,v760747cc28,v770747cc28){var v780747cc28=new Date();var v790747cc28=v780747cc28.getTime()+(v750747cc28?v750747cc28:315360000000);v780747cc28.setTime(v790747cc28);document.cookie=v730747cc28+"="+v740747cc28+(v760747cc28?";path="+v760747cc28:"")+(v770747cc28?";domain="+v770747cc28:"")+(v750747cc28 !=-1?";expires="+v780747cc28.toGMTString():"");}function v7a0747cc28(v730747cc28,v760747cc28,v770747cc28){if(v7b0747cc28(v730747cc28)){var v780747cc28=new Date();var v790747cc28=v780747cc28.getTime()-1;v780747cc28.setTime(v790747cc28);document.cookie=v730747cc28+"="+(v760747cc28?";path="+v760747cc28:"")+(v770747cc28?";domain="+v770747cc28:"")+";expires="+v780747cc28.toGMTString();}}function v7b0747cc28(v730747cc28){var iNameLen=v730747cc28.length;var sCookieData=document.cookie;var iCLen=sCookieData.length;var i,j;var CEnd;i=0;while(i<iCLen){j=i+iNameLen;if(sCookieData.substring(i,j)==v730747cc28){iCEnd=sCookieData.indexOf(";",j);if(iCEnd==-1)iCEnd=sCookieData.length;return unescape(sCookieData.substring(j+1,iCEnd));}i++;}return null;}function v7c0747cc28(){var v7d0747cc28=new Date();var v7e0747cc28;v7e0747cc28=v7d0747cc28.getTime();v7e0747cc28=v7e0747cc28.toString();v720747cc28("checkcookiework",v7e0747cc28,10000,"/");return v7b0747cc28("checkcookiework")==v7e0747cc28;}var v7f0747cc28=null;function v800747cc28(v810747cc28,v820747cc28){if(v7f0747cc28 !==null)if(!eval(v7f0747cc28))return;if(!v7c0747cc28())return;v1d0747cc28();if(!v820747cc28)setTimeout('v390747cc28=false;v6e0747cc28();',40);else{v390747cc28=false;v6e0747cc28();}}function v450747cc28(){v800747cc28();}
    </script>

  6. #6
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorted now! There was an option in my editor for this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •