Sitenizin Sağ ve Sol Tarafına Banner Koyma Kodları (Java)

'Web Programlama & Scriptler' forumunda semyav5mitq tarafından 14 Ocak 2009 tarihinde açılan konu

  1. Sitenizin Sağ ve Sol Tarafına Banner Koyma Kodları (Java) konusu Sitenizin Sağ ve Sol Tarafına Banner Koyma Kodları (Java)

    sol taraf için images/bannertruot1gif ve link1'i sağ taraf içinde images/bannertruot2gif ve link2 'yi düzenlemeniz yeterlidir

    Sitenin sağ ve solunda dik bannerler var.


    Java Kodları :

    Kod:
    <script language="javascript">
    function FloatTopDiv1(divid1,type){
        var startX, startY;    
        if (type==1) {startX = document.body.clientWidth - 115;} else {startX = 0;}
        if (type==2) {startY = document.body.clientHeight;} else {startY = 0;}
        if (document.body.clientWidth < 980) {startX = -115};    
        window.stayFloat=function(ftlObj,type)
        {
            var startX, startY;
            var ns = (navigator.appName.indexOf("Netscape") != -1);
            if (type==1) {startX = document.body.clientWidth - 110;} else {startX = 2;}
            if (document.body.clientWidth < 980){
                ftlObj.style.display = 'none';
            }else{
                    ftlObj.style.display = '';
                    
                    if (document.documentElement && document.documentElement.scrollTop)
                        var pY = ns ? pageYOffset : document.documentElement.scrollTop;
                    else if (document.body)
                        var pY = ns ? pageYOffset : document.body.scrollTop;
    
                    if (type==2){
                        startY = document.body.clientHeight-183;
                    }else{
                        if (document.body.scrollTop > 71){startY = 3} else {startY = 50};
                    }
                    ftlObj.y += (pY + startY - ftlObj.y)/6;
                    ftlObj.style.left=startX;
                    ftlObj.style.top=ftlObj.y;
                }
            setTimeout(function(){stayFloat(ftlObj,type)}, 20);        
        }
    
        var ftlObj = document.getElementById?document.getElementById(divid1):document.all?d.all[divid1]:document.layers[divid1];
        if(!ftlObj) return;
        ftlObj.x = startX;
        ftlObj.y = startY;
        stayFloat(ftlObj,type);
    }
    </script>
            
    <!-- check enable when resize window change -->
    <div id="floatdiv" style="position:absolute;width:105px;height:50px;left:0px;top:0px;padding:0px>
    <table border="0" cellpadding="0" cellspacing="0" class="data0" width="100%">    
                         <tr>
                            <td valign=top align="center" width="105" height="400">
                                <a href="link1" target="_blank">
    
                                <img border="0" src="images/bannertruot1.gif"></a></td></tr></table></div>
                    <SCRIPT TYPE="text/javascript">
                    FloatTopDiv1("floatdiv",1);
                    </SCRIPT>
        
                    
    <script language="javascript">
    function FloatTopDiv1(divid1,type){
        var startX, startY;    
        if (type==1) {startX = document.body.clientWidth - 115;} else {startX = 0;}
        if (type==2) {startY = document.body.clientHeight;} else {startY = 0;}
        if (document.body.clientWidth < 980) {startX = -115};    
        window.stayFloat=function(ftlObj,type)
        {
            var startX, startY;
            var ns = (navigator.appName.indexOf("Netscape") != -1);
            if (type==1) {startX = document.body.clientWidth - 110;} else {startX = 2;}
            if (document.body.clientWidth < 980){
                ftlObj.style.display = 'none';
            }else{
                    ftlObj.style.display = '';
                    
                    if (document.documentElement && document.documentElement.scrollTop)
                        var pY = ns ? pageYOffset : document.documentElement.scrollTop;
                    else if (document.body)
                        var pY = ns ? pageYOffset : document.body.scrollTop;
    
                    if (type==2){
                        startY = document.body.clientHeight-183;
                    }else{
                        if (document.body.scrollTop > 71){startY = 3} else {startY = 50};
                    }
                    ftlObj.y += (pY + startY - ftlObj.y)/6;
                    ftlObj.style.left=startX;
                    ftlObj.style.top=ftlObj.y;
                }
            setTimeout(function(){stayFloat(ftlObj,type)}, 20);        
        }
    
        var ftlObj = document.getElementById?document.getElementById(divid1):document.all?d.all[divid1]:document.layers[divid1];
        if(!ftlObj) return;
        ftlObj.x = startX;
        ftlObj.y = startY;
        stayFloat(ftlObj,type);
    }
    </script>
                    
                    <!-- check enable when resize window change -->
                    <div id="floatdiv1" style="position:absolute;width:105px;height:50px;left:0px;top:0px;padding:0px>
                    <table border="0" cellpadding="0" cellspacing="0" class="data0" width="100%">    
                         <tr>
                                    <a target="_blank" href="link2">
                                    <IMG src="images/bannertruot2.gif"  border=0></a> 
                         </tr>   
                        </table>
    
                    </div>
                    <SCRIPT TYPE="text/javascript">
                    FloatTopDiv1("floatdiv1",0);
                    </SCRIPT>
    
     

Bu Sayfayı Paylaş