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
-
Nathan L Smith May 19th, 2009 @ 09:46 AM
- State changed from unconfirmed to confirmed
-
Nathan L Smith May 19th, 2009 @ 06:22 PM
- State changed from confirmed to resolved
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.
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.