I kind of understand what you are trying to do, but I guess the code you
posted is not what you wanted me to see..

Few errors I see in your code, you need to have a "name" attribute for the
iframe:
<iframe name="myIframe">
Then when you want to use it :
<a href="file.html" target="myIframe">click me!</a>

Also, assume this iframe:
<iframe name="myIframe" id="anIframe"></iframe>

you should use this code:
 document.getElementById('*anIframe*').contentWindow..
If you are using mootools, you can also use:
$("anIframe").contentWindow...

You should google "iframe tutorial" and complete few of these if you are
having any other issues, this is really basic stuff

HTH

On Thu, Dec 17, 2009 at 3:07 AM, fastrix <[email protected]>wrote:

>
> Thanks for the response Roman! Yes, i already know what an iframe is. I
> have
> my accordion from mootools with 9 elements and "myiframe" in a main.html .
> In mouseover, each accordion element displays an image in which i want to
> click an load html content in the iframe.
>
> It doesn't happend with the target="myiframe" function. Thats the problem.
>
> This is the iframe code:
>
> <iframe width="580" id="catalogos"
>        onload="calcHeight();"
>        src="europa0.html"
>        scrolling="No"
>        frameborder="0"
>        height="1"></iframe>
>
> It's also resizable depending on the content:
>
> <script type="text/javascript">
> <!--
> function calcHeight()
> {
>  //find height
>  var the_height=
>    document.getElementById('myiframe').contentWindow.
>      document.body.scrollHeight;
>
>  //change height
>  document.getElementById('myiframe').height=
>      the_height;
> }
> //-->
> </script>
>
> and this is the code for the accordion element:
>
> </div>
>          <h3 class="toggler">Element1</h3>
>          <div class="element">
>              <h4> second.html  images/second.gif  </h4>
>          </div>
>
> Where the target doesn't work.
>
> I hope you can help me. Thanks in advance!
> --
> View this message in context:
> http://n2.nabble.com/accordion-link-to-iframe-tp4178346p4179088.html
> Sent from the MooTools Users mailing list archive at Nabble.com.
>



-- 
---
"Make everything as simple as possible, but not simpler."

- Albert Einstein

Reply via email to