Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello


my JavaScript function:
XML
<script language="javascript" type="text/javascript">
<pre lang="cs">function ShowHideAttachmentControls(btnId) {
           var ButtonID = btnId.id;
           var ButtonName = ButtonID.split(&#39;_&#39;);
           var TrNumber = parseInt(ButtonName[1]) + 1;
           var TrId = document.getElementById(&#39;trAttachment_&#39; + TrNumber);
           TrId.style.display = DisplayProperty;
           btnId.style.display = &#39;none&#39;;
       }
   &lt;/script&gt;</pre>




my code:
VB
<ajax:TabContainer ID="tabcontainer" runat="server" Font-Size="Medium" Width="100%"
        ActiveTabIndex="2" AutoPostBack="true">


<ajax:TabPanel runat="server" HeaderText="Email other Details" ID="TabPanel2" >
<contenttemplate>

<%-- --%>
<tr id="trAttachment_3" runat="server" style="display: none;">

<%----%>
<tr id="trAttachment_4" runat="server" style="display: none;">

<%----%>
<tr id="trAttachment_5" runat="server" style="display: none;">

<%-- --%>








<%----%>
<tr id="trAttachment_2" runat="server" style="display: none;">
 
Attachment 1

<asp:Label Id="lblAttachemnt1" runat="server"><asp:FileUpload ID="flupEmailAttachment" runat="server" />
<input type="button"
title="+" runat="server" id="btnAddMoreAttachment_1" value="+" />

No of Estimates
<asp:TextBox runat="server" ID="txtNoEstimates">
 <asp:RegularExpressionValidator ID="revNoEstimates" ControlToValidate="txtNoEstimates"
ValidationExpression="\d+" Display="Static" EnableClientScript="true" ErrorMessage="Please enter numeric value"
runat="server" />


 
Attachment 2
<asp:Label Id="lblAttachemnt2" runat="server"><asp:FileUpload ID="flupEmailAttachment2" runat="server"/>  <input type="button"
title="+" runat="server" id="btnAddMoreAttachment_2" value="+" />


 
Attachment 3
<asp:Label Id="lblAttachemnt3" runat="server"> <asp:FileUpload ID="flupEmailAttachment3" runat="server"/>  <input type="button"
title="+" runat="server" id="btnAddMoreAttachment_3" value="+" />


 
Attachment 4
<asp:Label Id="lblAttachemnt4" runat="server"> <asp:FileUpload ID="flupEmailAttachment4" runat="server" />  <input type="button"
title="+" runat="server" id="btnAddMoreAttachment_4" value="+" />


 
Attachment 5
<asp:Label Id="lblAttachemnt5" runat="server"><asp:FileUpload ID="flupEmailAttachment5" runat="server" />


 
Comments
<asp:TextBox runat="server" ID="txtEmailComments" Width="500px">
 
Note



<telerik:RadEditor ID="RadEditor2" Height="340px" Enabled="true" TableLayoutCssFile="~/Editor/css/TableLayoutCssFile.css" Width="700" runat="server">

<ImageManager ViewPaths="~/imagesRadEditor/" UploadPaths="~/imagesRadEditor/" DeletePaths="~/imagesRadEditor/" />


<mediamanager viewpaths="~/imagesRadEditor/" uploadpaths="~/imagesRadEditor/" deletepaths="~/imagesRadEditor/">
<flashmanager viewpaths="~/imagesRadEditor/" uploadpaths="~/imagesRadEditor/" deletepaths="~/imagesRadEditor/">
<documentmanager viewpaths="~/imagesRadEditor/" uploadpaths="~/imagesRadEditor/" deletepaths="~/imagesRadEditor/">


<fontnames>

<telerik:editorfont value="Arial" xmlns:telerik="#unknown">
<telerik:editorfont value="Arial Narrow" xmlns:telerik="#unknown">
<telerik:editorfont value="Arial Black" xmlns:telerik="#unknown">
<telerik:editorfont value="Vardana" xmlns:telerik="#unknown">
<telerik:editorfont value="Tahoma" xmlns:telerik="#unknown">
<telerik:editorfont value="Century" xmlns:telerik="#unknown">


<content>












 
<asp:Button ID="btnSendEmail" runat="server" Text="Send Email" Width="150px" OnClick="btnSendEmail_Click" />
 















so when i clicked

onclick="ShowHideAttachmentControls(this);"

this function is not fired on click.

without tab container is working but with tab container is not working

i set autopost tabcontainer = true but is not working

how to do?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900