WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 addTabPage doesnt work?, Martin, September 13, 2004
     Re:addTabPage doesnt work?, Martin, September 13, 2004

Subject: Re:addTabPage doesnt work? From: Martin Date: September 13, 2004

The two tabs had different names, just a copy'n'paste glitch.

But i'm still short by an answer.

/Martin


 

From: Martin
Sent: September 13, 2004
Subject: Re:addTabPage doesnt work?

Ok i've been reading all the forums, looked everywhere for help, read the .js file but i'm still stuck.

I simply cant get the addTabPage to work correctly.

If i add

<div class="tab-pane" id="tab-pane-1">
  <div class=tab-page>
    <h2 class=tab>Test</h2> 
    <p>Hey there you jolly'o'man</p>
  </div>
</div>

manually, it works just fine, it adds the page and shows the text with the border.

If i however tries to do

-----------------------------------------------------

<script>

function AddTabPage(TabPanel, TabName)
{
 var newDiv = document.createElement('div');
 newDiv.className = "tab-page";
 
 var newH2 = document.createElement('h2');
 newH2.className = "tab";
 var newH2TabText = document.createTextNode(TabName);
 
 newH2.appendChild(newH2TabText);
 newDiv.appendChild(newH2);

 var test = document.createTextNode("test");
 newDiv.appendChild(test);

 TabPanel.addTabPage(newDiv);
}

</script>

<div class="tab-pane" id="tab-pane-1">

<script type="text/javascript">
  var tabPane1 = new WebFXTabPane( document.getElementById( "tab-pane-1" ) );
  AddTabPage(tabPane1, 'Test');
</script>

  <div class=tab-page>
    <h2 class=tab>Test</h2> 
    <p>Hey there you jolly'o'man</p>
  </div>
</div>

-----------------------------------------------

It does create the page, and i'm able to click and switch between them. But no text, no box.. just empty... I've even tried to debug the js script and the outerhtml is exactly the same! So if anyone have a note on what is happening i would much appriciate it...

Regards
- Martin

 





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX