troubleshooting Question

Where to place javascript code ??? when use ajax toolkit tabpanel

Avatar of jyllan
jyllanFlag for Denmark asked on
JavaScriptWeb DevelopmentASP.NET
2 Comments1 Solution701 ViewsLast Modified:
Hi

Anybody who knows about where to put a javascript function used in one of the ajax tabpanel.

I have a javascript funtion to reset some textboxes, it succes without ajax tab, but when I use the ajax toolkit tabpanel,
nothing happens.

Hi tion

Yes I have tried without succes.

See my Visual studio 2008 code down here, if you take the javascript code and use it without tabcontainer/tabpanel it is well doing.

So if anybody know what to do with tabs, it will be nice the see how.


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Administration_Default2" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Page</title>
</head>

<body>

<script type= "text/javascript">

function contactchangevalue()

{

this.form1.TextBox1.value = "";

this.form1.TextBox2.value = "";



}

</script>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"

Width="381px">

<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">

</cc1:TabPanel>

<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">

<ContentTemplate>

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

<br />

<br />

<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Button ID="Button2" runat="server" OnClientClick ="contactchangevalue()" Text="Reset" />

</ContentTemplate>




</cc1:TabPanel>

</cc1:TabContainer>

<br />

<div>



<br />


</div>

</form>

</body>

</html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros