flashjordan
asked on
Target a Spry Tab from an iframe in the tabs
Hi,
I have a website that has Dreamwevers Spry Tabs that are dynamically loaded... within each tab, is an iframe. in the iframe I have a button that I need to change the Spry Tabs of the parent so to speak... If I do not use an iframe, I use the following code for the button for example....
<a href="#" onclick="TabbedPanels1.sho wPanel(11) " ><img src="images/box/enquire.pn g" width="80" height="24" border="0" /></a>
The problem is that this doesn't work when it is in an iframe in the tab...
Any help would ne much appreciated
Thanks
I have a website that has Dreamwevers Spry Tabs that are dynamically loaded... within each tab, is an iframe. in the iframe I have a button that I need to change the Spry Tabs of the parent so to speak... If I do not use an iframe, I use the following code for the button for example....
<a href="#" onclick="TabbedPanels1.sho
The problem is that this doesn't work when it is in an iframe in the tab...
Any help would ne much appreciated
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The tab loads iframes on demand with for exampel:
<li class="TabbedPanelsTab" tabindex="11" onClick="getPage('FrameSit el', 'contactus.php')">Contact< /li>
and
<iframe name="FrameSitel" id="FrameSitel" frameborder="0" style="width:780px; height:450px;" scrolling="no"></iframe>
if that helps?
<li class="TabbedPanelsTab" tabindex="11" onClick="getPage('FrameSit
and
<iframe name="FrameSitel" id="FrameSitel" frameborder="0" style="width:780px; height:450px;" scrolling="no"></iframe>
if that helps?
ASKER
With a little trial and a lot of error, came up with the following that works with the frames tab above
<a href="#" onclick="parent.TabbedPane ls1.showPa nel(12); parent.getPage('FrameSitel ', 'contactus.php');">
<a href="#" onclick="parent.TabbedPane
I'm not completely clear enough with your issue. I guess you are loading the iframe content through a javascript function, what you can do is you can create a separate javascript function on the iframe page to control both iframe content loading and tab switching.
<a href="#" onclick="parent.getPage('FrameSitel', 'contactus.php');parent.TabbedPanels1.showPanel(1)" >Frame Button</a>
ASKER
Great thanks, needed a little modification to load the page, but what you gave me was great... Thanks
Thanks for the grading.......... I'm glad that you solved it yourself :-). Nice Job!
ASKER
Yep, that sort of works, the only thing it doesn't do is load the content of the tab that it is going to
Any ideas