#29 ✓resolved
spingary

Using <base href=""> throws exception in tabs.js

Reported by spingary | September 18th, 2008 @ 04:37 PM | in 1.0

My site uses


<base href="http://mysite.com/" />

And so my anchors for my tabs are rendered like this


<a href="/folder/page.html#one">Tab One</a>
<a href="/folder/page.html#two">Tab Two</a>

When initializing the tabs, an error is thrown:

Control.Tabs: #page.htmlone was not found on the page.

Changing line 79 of tabs.js from


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('/').last().replace(/#/,'');

to


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last().replace(/#/,'');

Works for me. I'm not sure why the orig code wants to get the filename (that last split). In fact, I think this may work too:


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last();

Apologies in advance if this is not thorough enough.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/

High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.

Pages