So I’ve been building a section of a website using the YUI TabView and having some difficulty getting the beforeActiveTabChangeevent to work right. Now I was using version 2.5.2 first, and in that version, this event doesn’t even fire. So I tried using beforeActiveChange on the tab itself. I could get this to fire, but returning false as the documents say to do, would not stop the event from continuing. So I did some digging, and found a post somewhere out there – I’ve lost it now – saying that 2.6 fixed this problem. Well I tried that for a little while, and found that in 2.6, TabView’s beforeActiveTabChange does indeed fire, but it has the same problem that beforeActiveChange had in 2.5.2 – returning false does nothing.
Well as you can imagine, I found this to be frustrating. So I started doing a little more digging – had a post on the YUI Developer boards go unanswered, googled a bunch of things – and then stumbled on to the face that 2.7 had been released. Well I tried using that – figuring what the heck – and it worked! beforeActiveTabChange stopped the tabs from changing if false was returned! Hallelujah! Now I haven’t tried to see if beforeActiveChange at the tab level works now or not, but I’m just so happy to have the TabView event work.
Was looking for how to do this. Thanks!!