Results 1 to 3 of 3

Thread: iframe issue

  1. #1
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iframe issue

    I have designed a site that has an image on the right (constant) and an iframe on the left in a table. THe corresponding menu links pop up in iframe of course.

    I want to have gallery pics in the iframe and when cllicked they open where the constant pic is on the home page. So I can keep it all without changing th emain home page. I ID'd the pic on the home page, but I am assuming using this particular javascript, that the gallery only works within the same html page and not whatever is on the screen. Is this correct or am I not making any sense what so ever?

  2. #2
    Join Date
    Nov 2004
    Location
    Here to often...
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Right is this correct

    You want the naviagtion that is the iframe to change the pictures the main page?

    What javascript are you using?

    Do you have an example of the page?

    regards

    Donna

  3. #3
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default thanks...

    here it is. THe current contents pop up in an iframe.

    i have photos in this iframe, that I would like to change th epicture on the home page which is still visible.

    Here is the java I am using. Included is the first line of the table.

    <script language="JavaScript" 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[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    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[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].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[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>
    <script language="JavaScript">
    <!--
    <!-- hide this script from non-javascript-enabled browsers

    if (document.images) {

    }

    // stop hiding -->
    //-->
    </script>
    <body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="326" height="320" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#9db9d1" bgcolor="#9db9d1">
    <tr>
    <td width="1">&nbsp;</td>
    <td width="57" height="99"><div align="center"><a href="#" onFocus="if(this.blur)this.blur()"><img src="images/icon/DVD_RustyJoiner275.jpg" name="Image1" width="57" height="80" border="0" id="Image1" onClick="MM_swapImage('bigpic','','images/icon/DVD_RustyJoiner275.jpg',1)"></a></div></td>

    the "bigpic" is the name of the home photo, that I woul dlike changed. On the smae html page as the thumbnails, it works fine...is there a way to make this work ya think?

Bookmarks

Posting Permissions

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