1

Possible Duplicate:
Iframe Function Calling From Iframe to parent page javascript function

I have a parent page running scrollTo.js. There are four panels to scroll to with each panel having content in the form of an iframe. Each iframes content is generated by a link in the previous iframe. Problem: how do I call the parent function from the iframe?
Parent:

<a href="#item2" class="panel" onclick="ipage.location='jam2.html'">home made jam</a> |
<a href="#item2" class="panel" onclick="ipage.location='away.html'">international 
flavour</a>

iframe:

<a href="" onclick="parent.ipage2.location='local.html'">local produce</a> | <a href=""
onclick="parent.ipage2.location='specials.html'">specials</a> | <a href=""
onclick="parent.ipage2.location='international.html'">world ingredients</a>
Community
  • 1
  • 1
dave
  • 11
  • 2
  • What are the `ipage` and `ipage2` variables? Why do you think `window.parent` does not work? – Bergi Sep 17 '12 at 08:11
  • Your question has been answered here http://stackoverflow.com/questions/2161388/iframe-function-calling-from-iframe-to-parent-page-javascript-function – Scott Sep 17 '12 at 09:44
  • there are four ipages, one for each panel. – dave Sep 18 '12 at 08:28
  • I figured how to load any content into any frame using the onclick function. This works, though if there is a way to make this happen in the href command, or any other, then maybe I can use the onclick to call the page to scrollto a panel. p.s. excuse my jargon, I am a newbie and may use the wrong terminology. – dave Sep 18 '12 at 08:35

0 Answers0