I have Dreamweaver CS3 and I'm trying out the new Spry stuff like the tabbed panels ( and I like it =P ). I am using the tabbed panels and need to know how to dynamically create a new tab with javascript with some content inside ( and switch to it ). Also, I need to figure out how I can delete tabs at "runtime"? I have tried many things to do this, but Firefox has no new errors in the Error Console and nothing is happening...
Spry Tabbed Panels ( Dreamweaver CS3 ) question.
Collapse
X
-
Originally posted by acoderShow what code you have so far.
Here's what I have finally came up with and gave up with ( does not work )
[CODE=javascript]
function addMainTab(titl e, content)
{
document.getEle mentById('Tabbe dPanels1').firs tChild.innerHTM L += '<li class="TabbedPa nelsTab" tabindex="0">'+ title+'</li>';
document.getEle mentById('Tabbe dPanels1').last Child.innerHTML += '<div class="TabbedPa nelsContent">'+ content+'</div>';
var TabbedPanels1 = new Spry.Widget.Tab bedPanels("Tabb edPanels1");
}
[/CODE]Comment
-
Originally posted by acoderI'm not too familiar with Spry, but perhaps that Spry call should come first.
Do you get any errors?Comment
-
Originally posted by eboyjr14No, I do not get any errors in Firefox ( which is weird ) and when that function is called, it goes to the first tab. When the document gets loaded, it calls Spry.Widget.Tab bedPanels("Tabb edPanels1") just create it at first.Thanks for your help.Comment
Comment