Google Images

Discussion in 'Google' started by Tidal74, Mar 14, 2007.

  1. #1
    My programer placed this bit of script on a number of pages and now the images on those pages are no longer indexed by google- although the pages themselves are- Any ideas as to why- I thought it might be obvious for somebody with more programming background. Thanks

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function clearText(thefield){
    if (thefield.defaultValue==thefield.value)
    thefield.value = ""
    }

    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
    }

    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;}}
    }

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
     
    Tidal74, Mar 14, 2007 IP
  2. NYDAz

    NYDAz Peon

    Messages:
    685
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i think it's a bh script
     
    NYDAz, Mar 14, 2007 IP
  3. Tidal74

    Tidal74 Active Member

    Messages:
    578
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #3
    do you think it would effect the indexing of images? Whats a bh script anyways?
     
    Tidal74, Mar 14, 2007 IP
  4. mvandemar

    mvandemar Notable Member

    Messages:
    2,409
    Likes Received:
    307
    Best Answers:
    0
    Trophy Points:
    230
    #4
    Why on earth would you think that?

    bh stands for black hat, which this isn't. It's an image swapping script using Javascript. That particular block is signature code for Dreamweaver, if I'm not mistaken.

    If the only way to access the images is through Javascript then they will indeed get deindexed. Where the images would normally go you could also place <img> tags pointing to them, and wrap those tags in <noscript> blocks. That should help.

    -Michael
     
    mvandemar, Mar 14, 2007 IP