PDA

View Full Version : [FIXED] [V0.8] TabFx Error



Timothy
Apr 01, 2009, 11:36 AM
Hello,

The following example demonstrates a complication with the TabFx plugin:

Example.aspx:


<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)
{
TabPanel1.SetActiveTab(Tab2);
}

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Example</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager2" runat="server" Theme="Gray" />
<ext:TabPanel ID="TabPanel1" runat="server" Border="false">
<Tabs>
<ext:Tab ID="Tab1" runat="server" AutoHeight="true" Title="Tab 1">
<Body>
<ext:Button ID="Button1" runat="server" AutoPostBack="true" &#111;nclick="Button1_Click" Text="Switch ..." />
</Body>
</ext:Tab>
<ext:Tab ID="Tab2" runat="server" AutoHeight="true" Title="Tab 2">
<Body>
Word
</Body>
</ext:Tab>
</Tabs>
<Plugins>
<ext:TabFx ID="TabFx1" runat="server" />
</Plugins>
</ext:TabPanel>
</form>
</body>
</html>


Replication steps:

1. Load page
2. Click Switch ...
3. Notice javascript error

Cheers,
Timothy

Vladimir
Apr 02, 2009, 4:55 AM
Hi Timothy,

Fixed. Please update.


Please note that it is better to use ActiveTab and ActiveTabIndex (at least during postback but during AjaxEvent can be used also). Otherwise you can see twice highlight (one from init config, seconf from SetActiveTab generated script)

Timothy
Apr 02, 2009, 11:02 AM
Works, and thanks for the suggestion!

Cheers,
Timothy