Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on May 01, 2009 12:44
open dhtmlx forum
Use TabBar as Menu

How can I make <a href="a_url" /> work as defined in the xml below:

<?xml version="1.0"?>
<tabbar>
<row>
<tab id="p1" width="100px"><![CDATA[<a href="page1.html">Page 1</a>]]></tab>
<tab id="p2" width="100px"><![CDATA[<a href="page2.html">Page 2</a>]]></tab>
<tab id="p3" width="100px"><![CDATA[<a href="http://www.google.com">Google</a>]]></tab>
</row>
</tabbar>

The anchor url link does not work.

I had to write javascript and use location.href = "a url" to make the tabbar behave like a menu.

Thanks!
Answer posted by Alex (support) on May 04, 2009 01:57

Hello, 

Tabs also have onclick event handlers. So, bubbling must be canceled in this case:

...

<tab id="p1" width="100px"><![CDATA[<a href="page1.html" onclick="(event||arguments[0]).cancelBubble = true">Page 1</a>]]></tab>

....