Link to home
Start Free TrialLog in
Avatar of flashjordan
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.showPanel(11)" ><img src="images/box/enquire.png" 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
ASKER CERTIFIED SOLUTION
Avatar of shirazti
shirazti
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flashjordan
flashjordan

ASKER

Thanks for the reply
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
The tab loads iframes on demand with for exampel:
<li class="TabbedPanelsTab" tabindex="11" onClick="getPage('FrameSitel', 'contactus.php')">Contact</li>

and

<iframe name="FrameSitel" id="FrameSitel" frameborder="0" style="width:780px; height:450px;" scrolling="no"></iframe>

if that helps?
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.TabbedPanels1.showPanel(12); parent.getPage('FrameSitel', 'contactus.php');">
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>

Open in new window

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!