Results 1 to 2 of 2

Thread: JavaScript issue Firefox and IE compliancy

  1. #1
    Join Date
    Feb 2010
    Location
    Albany, NY
    Posts
    2

    Unhappy JavaScript issue Firefox and IE compliancy

    I have tried all I know to make this script work in Firefox it works in IE 6 and 7. Is there a fix or some other way to make a link on this thumbnail work.

    What I want to do is have a small image on one location and have the image change in another. I not a pro with javascript so please speak with small words.

    <img src="thumbnails/_MG_0027.jpg" alt="" onclick="document.all.large.src='images/_MG_0027.jpg'">


    PHP Code:
    <script type="text/javascript">
    function 
    MM_preloadImages() { //v3.0
      
    var d=document; if(d.images){ if(!d.MM_pd.MM_p=new Array();
        var 
    i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0i<a.lengthi++)
        if (
    a[i].indexOf("#")!=0){ d.MM_p[j]=new Imaged.MM_p[j++].src=a[i];}}
    }
    function 
    MM_swapImgRestore() { //v3.0
      
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function 
    MM_findObj(nd) { //v4.01
      
    var p,i,x;  if(!dd=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        
    d=parent.frames[n.substring(p+1)].documentn=n.substring(0,p);}
      if(!(
    x=d[n])&&d.allx=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(
    i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!
    && d.getElementByIdx=d.getElementById(n); return x;
    }
    </script> 
    Last edited by Alan; 25 Feb 2010 at 09:41 AM. Reason: Add code tags

  2. #2
    Join Date
    Feb 2010
    Location
    Albany, NY
    Posts
    2
    Well I found the solution on my own and it's a simple fix. At first I was going to make a gorup of image maps that opened in an Iframe but it's a pain to have to make so many pages. And Frames are crap!!! So I decided to use lightbox2.04 and the concept is good but the amount of code is well, extream. However the best part is you don't have to do to much with the code to make it work for you . With a bit of CSS I think it will work fine. The site in question has a flash version and I am making the static version. http://www.thepicturepair.com

Tags for this Thread

Posting Permissions

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