Hi, I used the code in http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/add-remove-tabs/defaultcs.aspx, with the following differences:
1. within the multipage, there is no RADGrid as I do not want to show any data in the first tab
2. when clicking on the + button, i am loading my user control file using Page.LoadControl. This user control has only 2 textboxes and a button.
Rest everything is the same.
My problem is: i have a javascript function within the ascx which is called on button click. On clicking the button, i am getting the error: ReferenceError: <function> is not defined. The behavior is same for all the javascript / jquery functions defined in the ascx. I enclosed my script block with RadScriptBlock.
My ascx code is below: (actually i developed this test user control to pinpoint the issue as my main user control was giving the same error)
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Testtab.ascx.cs" Inherits="Common_UserControl_Testtab" %>
<div>
<label>Name:</label>
<input name="txtFirstName" type="text" class="actxtbox txtbox" runat="server" id="txtName" size="15" />
<label>Age:</label>
<asp:TextBox ID="txtAge" runat="server" MaxLength="100"></asp:TextBox>
<input type="button" onclick="javascript: save();" value="save"/>
<br />
</div>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function save() {
alert('test');
}
</script>
</telerik:RadScriptBlock>
I went through the forum posts which talk about similar issue, but none of the suggestions posted work for me. Please provide any pointers to solve the issue.
Thanks
Suchitra
1. within the multipage, there is no RADGrid as I do not want to show any data in the first tab
2. when clicking on the + button, i am loading my user control file using Page.LoadControl. This user control has only 2 textboxes and a button.
Rest everything is the same.
My problem is: i have a javascript function within the ascx which is called on button click. On clicking the button, i am getting the error: ReferenceError: <function> is not defined. The behavior is same for all the javascript / jquery functions defined in the ascx. I enclosed my script block with RadScriptBlock.
My ascx code is below: (actually i developed this test user control to pinpoint the issue as my main user control was giving the same error)
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Testtab.ascx.cs" Inherits="Common_UserControl_Testtab" %>
<div>
<label>Name:</label>
<input name="txtFirstName" type="text" class="actxtbox txtbox" runat="server" id="txtName" size="15" />
<label>Age:</label>
<asp:TextBox ID="txtAge" runat="server" MaxLength="100"></asp:TextBox>
<input type="button" onclick="javascript: save();" value="save"/>
<br />
</div>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function save() {
alert('test');
}
</script>
</telerik:RadScriptBlock>
I went through the forum posts which talk about similar issue, but none of the suggestions posted work for me. Please provide any pointers to solve the issue.
Thanks
Suchitra