Anybod know what this code is for?

Discussion in 'Programming' started by traffichero, Apr 4, 2008.

  1. #1
    Hi,

    Does anybody know what this code does:

    <script>

    if (parent.frames.length > 0) {
    parent.location.href = self.document.location
    }


    </script>

    Thank you,

    traffichero
     
    traffichero, Apr 4, 2008 IP
  2. traffichero

    traffichero Peon

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What about this one?

    <script type="text/JavaScript">
    <!--



    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
    }
    //-->
    </script>
     
    traffichero, Apr 4, 2008 IP
  3. Technica

    Technica Active Member

    Messages:
    624
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

    this is a javascript function that is used for mouse over effect of the images. ther are other functions along with this function, i dont remember the name but I have used them.

    i think the other related functions are MM_swapImage(),MM_swapImgRestore()

    Hope it helps
     
    Technica, Apr 5, 2008 IP