Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript or some other conflict

    I added a pop - in banner ad and for some reason even when I change the x and y axis to position the banner location it doesn't change and also notice how the banner is behind some of the navigation menu (attached image)javascript or some other conflict-popin.jpg.

    Here's the code for the popin banner:

    Code:
      
    {literal}
    <SCRIPT language='JavaScript' type=text/javascript>
    <!--
    document.write("<table width='600' height='470' border='0' cellspacing='0' cellpadding='1' style='display:none;position:absolute;top:10px;left:10px;empty-cells:hide' id='v1771401733196945v181'>");
    document.write("<tr><td style='background: #fff'>");
    document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>");
    document.write("<tr height='1'><td>");
    document.write("<table width='100%' border='0' cellspacing='1' cellpadding='0' style='background: #27539f; color: #FFFFFF; cursor: default'><tr style='font-family: Arial, sans-serif; font-size: 20pt; font-weight: bold'><td style='text-align: center;'>Chart of the Day");
    // document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771401733196945v183();'>-");
    // document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771401733196945v184();'>X");
    document.write("</table>");
    document.write("<tr><td>");
    document.write("<table width='100%' height='100%' id='v1771401733196945v185' border='0' cellpadding='0' cellspacing='0' bgcolor='#27539f'>");
    document.write("<tr>");
    document.write("<td>");
    document.write("<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr><td style='text-align: center;'><p><font face=\"Verdana\" size=\"3\" color=\"White\"> To sign up to receive a daily Chart of the Day.</font><font face=\"Verdana\" size=\"3\" color=\"White\"> Click <a style='color:yellow;' href='https://www.example.com/cod_opt-in/' target='_blank'>Here.</a></font></p><p align=\"center\"><img border=\"0\" src=\"cod.jpg\"><br>&nbsp;</td></tr></table>");
    document.write("<tr style='height: 10px'><td style='text-align: center'><INPUT type='button' value='Close' style='cursor: pointer' onclick='javascript:v1771401733196945v184();'>");
    document.write("</table></table></table>"); if ( document.getElementById ) v1771401733196945v186 = document.getElementById ( "v1771401733196945v181" ); else v1771401733196945v186 = document.all ["v1771401733196945v181"]; var v1771401733196945v187 = undefined; var v1771401733196945v188 = false; function v1771401733196945v183 ( ) {   if ( document.getElementById )     v189 = document.getElementById ( "v1771401733196945v185" );   else     v189 = document.all ["v1771401733196945v185"];   if ( v189.style.display == "none" )     {       v189.style.display = "";       v1771401733196945v186.style.height = "296px";     }   else     {       v189.style.display = "none";       v1771401733196945v186.style.height = "20px";     } } function v1771401733196945v184 ( ) {   v1771401733196945v186.style.display = "none";   v1771401733196945v188 = true; } var v1771401733196945v175, v1771401733196945v176; var v1771401733196945v190, v1771401733196945v191; function v1771401733196945v192 ( ) {   return ( ( window.pageXOffset ) ? window.pageXOffset : document.body.scrollLeft ) + v1771401733196945v190; } function v1771401733196945v193 ( ) {   return ( ( window.pageYOffset ) ? window.pageYOffset : document.body.scrollTop ) + v1771401733196945v191; } function v1771401733196945v194 ( ) {   var v195 = 500;   v1771401733196945v186.style.top = v1771401733196945v193 ( );   v1771401733196945v186.style.left = v1771401733196945v192 ( );     setTimeout ( "v1771401733196945v194 ( );", v195 ); } function v1771401733196945v197 ( v198 ) {   if ( v1771401733196945v190 != v1771401733196945v175 || v1771401733196945v191 != v1771401733196945v176 )     {       if ( v1771401733196945v190 != v1771401733196945v175 )         if ( Math.abs ( v1771401733196945v190 - v1771401733196945v175 ) <= v1771401733196945v199 )           v1771401733196945v190 = v1771401733196945v175;         else           if ( v1771401733196945v190 < v1771401733196945v175 )             v1771401733196945v190 += v1771401733196945v199;           else             v1771401733196945v190 -= v1771401733196945v199;       if ( v1771401733196945v191 != v1771401733196945v176 )         if ( Math.abs ( v1771401733196945v191 - v1771401733196945v176 ) <= v1771401733196945v199 )           v1771401733196945v191 = v1771401733196945v176;         else           if ( v1771401733196945v191 < v1771401733196945v176 )             v1771401733196945v191 += v1771401733196945v199;           else             v1771401733196945v191 -= v1771401733196945v199;       v1771401733196945v186.style.top  = v1771401733196945v193 ( );       v1771401733196945v186.style.left = v1771401733196945v192 ( );       setTimeout ( "v1771401733196945v197 ( " + v198 + " );", 20 );     }   else     if ( v198 )       v1771401733196945v194 ( );     else       v1771401733196945v186.style.display = "none"; } function v1771401733196945v200 ( v201, v202 ) {   v1771401733196945v175 = v201;   v1771401733196945v176 = v202;   v1771401733196945v190 = v201;   v1771401733196945v191 = v202;    var v205 = 0, v206 = 0;    v206 = -v202 -296;    if ( v205 != 0 && v206 != 0 )      if ( Math.abs ( v205 ) < Math.abs ( v206 ) )        v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 );      else        v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 );   v1771401733196945v190 += v205;   v1771401733196945v191 += v206;   v1771401733196945v186.style.top  = v1771401733196945v193 ( );   v1771401733196945v186.style.left = v1771401733196945v192 ( );   v1771401733196945v186.style.display = "";   v1771401733196945v197 ( true ); } function v1771401733196945v196 ( ) {   if ( v1771401733196945v188 )     return;   v1771401733196945v199 = undefined;    var v205 = 0, v206 = 0;    var v201 = v1771401733196945v175, v202 = v1771401733196945v176;    v206 = -v202 -296;    if ( v205 != 0 && v206 != 0 )      if ( Math.abs ( v205 ) < Math.abs ( v206 ) )        v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 );      else        v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 );   v1771401733196945v175 += v205;   v1771401733196945v176 += v206;   v1771401733196945v186.style.top  = v1771401733196945v193 ( );   v1771401733196945v186.style.left = v1771401733196945v192 ( );   v1771401733196945v186.style.display = "";   v1771401733196945v197 ( false ); } var v1771401733196945v199 = 24; function v207 ( v208 ) {   var v209 = v208.length;   var v210 = document.cookie;   var v211 = v210.length;   var v179, v212;   var v213;   v179 = 0;   while ( v179 < v211 )     {       v212 = v179 + v209;       if ( v210.substring ( v179, v212 ) == v208 )         {           v214 = v210.indexOf ( ";", v212 );           if ( v214 == -1 )             v214 = v210.length;           return unescape ( v210.substring ( v212 + 1, v214 ) );         }       v179++;     }   return null; } if ( v207 ( "v1771401733196945" ) == null )   {     var v215 = new Date ( );     var v216 = v215.getTime ( ) + 86400000;     v215.setTime ( v216 );     document.cookie = "v1771401733196945=; expires=" + v215.toGMTString();     setTimeout ( "v1771401733196945v200 ( 320, 200, 24 );", 1500 );   } var v1771401733196945v217, v1771401733196945v218; function v1771401733196945v219 ( v220 ) {   v221 = ( document.all ) ? event.clientX : v220.clientX;   v222 = ( document.all ) ? event.clientY : v220.clientY;   v1771401733196945v190 += v221 - v1771401733196945v217;   v1771401733196945v191 += v222 - v1771401733196945v218;   v1771401733196945v217 = v221;   v1771401733196945v218 = v222;   v1771401733196945v186.style.top  = v1771401733196945v193 ( );   v1771401733196945v186.style.left = v1771401733196945v192 ( ); } function v1771401733196945v223 ( ) { } function v1771401733196945v224 ( ) {   document.onmousemove = v1771401733196945v223;   document.onmouseup   = v1771401733196945v223; } function v1771401733196945v225 ( v220 ) {   v1771401733196945v217 = ( document.all ) ? event.clientX : v220.clientX;   v1771401733196945v218 = ( document.all ) ? event.clientY : v220.clientY;   document.onmousemove = v1771401733196945v219;   document.onmouseup   = v1771401733196945v224; } v1771401733196945v186.onmousedown = v1771401733196945v225;
    //-->
    </SCRIPT>
    {/literal}

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    I'd suggest getting rid of the antiquated document.write calls and use more modern JavaScript DOM calls that provide greater control over exactly where in the page the code gets inserted.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes, thank you. will do!


  •  

    Posting Permissions

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