Archive for the ‘tabbifier’ Category

movable tabber

Wednesday, August 15th, 2007

Cool, the folks over at Movable Type (blogging software) are using my JavaScript tabs script. They even came up with a nice enhancement.

workaround for entity bug (?) in tabber

Tuesday, February 6th, 2007

A user of my tabber script discovered that when his tab headings had an ampersand character like this:

<h2>Me &amp; My Shadow</h2>

Then the tab control displayed “&amp;” instead of a single ampersand character.

It looks like this occurs because the JavaScript DOM function document.createTextNode() does not convert entities. However, it looks like innerHTML does convert entities, so to fix your problem find the following line in tabber.js:

DOM_a.appendChild(document.createTextNode(t.headingText));

and replace with the following:

DOM_a.innerHTML = t.headingText;

I’ll think about this some more and if I can’t find any bad side effects I’ll add to the tabber code.

JavaScript tab interface with persistent tabs

Friday, April 7th, 2006
cookies

Now with yummy cookies!

I added an example page showing how you can use the new onLoad and onClick function hooks in my JavaScript tabifier to make the tabs persistent (using browser cookies).

That is, if you leave the page and come back later, the tab you previously selected will still be selected.