Click here to Skip to main content
15,896,421 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
Hi

  Here i'm using tab option using jquery it's working fine but with in update panel placed gridview when i try to fire event from gridview that jquery tab's not wroking,but without any event's fire that's tab's wroking fine

  How make it...
here my code is:
 <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.easytabs.min.js" type="text/javascript"></script>
    <script src="js/jquery.hashchange.min.js" type="text/javascript"></script>

<script type="text/javascript">
    //On Page Load
    $(function () {
        $("#tab-container").easytabs();
   });
    //On UpdatePanel Refresh
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    if (prm != null) {
        prm.add_endRequest(function (sender, e) {
            if (sender._postBackSettings.panelsToUpdate != null) {
                $("#tab-container").easytabs();
            }
        });
    };
</script>


//HTml Code


<pre lang="HTML"><asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div id="tab-container" class='tab-container'>
 <ul class='etabs'>
   <li class='tab'><a href="#tabs1-html">Shift</a></li>
   <li class='tab'><a href="#tabs1-js">Options</a></li>
 </ul>
 <div class='panel-container'>
  <div id="tabs1-html">

      <table class="style1">
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  &nbsp;</td>
              <td class="style14">
                  &nbsp;</td>
              <td class="style23">
                  &nbsp;</td>
              <td class="style15">
                  &nbsp;</td>
              <td class="style16">
                  &nbsp;</td>
              <td class="style18">
                  &nbsp;</td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  Shift Code</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:TextBox ID="txtcode" runat="server" CssClass="textfield" Height="17px" Width="100px" autocomplete="off"></asp:TextBox></td>
              <td class="style15">
                  Shift Name</td>
              <td class="style16">
                  :</td>
              <td class="style18"><asp:TextBox ID="txtname" runat="server" CssClass="textfield" Height="17px"  Width="100px" autocomplete="off"></asp:TextBox></td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  Time IN</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:TextBox ID="txtchkin" runat="server" CssClass="textfield" Height="17px"  Width="100px"></asp:TextBox>
            <asp:MaskedEditExtender ID="MEEcheckin" runat="server" AcceptAMPM="false"
                        ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtchkin" UserTimeFormat="TwentyFourHour">
                    </asp:MaskedEditExtender>
                    <asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MEEcheckin" ControlToValidate="txtchkin"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
              <td class="style15">
                  Time Out</td>
              <td class="style16">
                  :</td>
              <td class="style18"><asp:TextBox ID="txtchkout" runat="server" CssClass="textfield" Height="17px"
                        Width="100px"></asp:TextBox>
                    <asp:MaskedEditExtender ID="MEEcheckout" runat="server"
                        AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtchkout">
                    </asp:MaskedEditExtender>
                    <asp:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MEEcheckout" ControlToValidate="txtchkout"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  Break In</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:TextBox ID="txtbrkin" runat="server" CssClass="textfield" Height="17px"
                        Width="100px"></asp:TextBox>
                    <asp:MaskedEditExtender ID="MEErbkin" runat="server"
                        AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtbrkin">
                    </asp:MaskedEditExtender>
                    <asp:MaskedEditValidator ID="MaskedEditValidator4" runat="server" ControlExtender="MEErbkin" ControlToValidate="txtbrkin"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
              <td class="style15">
                  Break Out</td>
              <td class="style16">
                  :</td>
              <td class="style18"><asp:TextBox ID="txtbrkout" runat="server" CssClass="textfield" Height="17px"
                        Width="100px"></asp:TextBox>
                    <asp:MaskedEditExtender ID="MEErbkout" runat="server"
                        AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtbrkout">
                    </asp:MaskedEditExtender>
                     <asp:MaskedEditValidator ID="MaskedEditValidator3" runat="server" ControlExtender="MEErbkout" ControlToValidate="txtbrkout"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  &nbsp;</td>
              <td class="style14">
                  &nbsp;</td>
              <td class="style23">
                  &nbsp;</td>
              <td class="style15">
                  Max End</td>
              <td class="style16">
                  :</td>
              <td class="style18"><asp:TextBox ID="txtmaxEnd" runat="server" autocomplete="off"
                    CssClass="textfield" Height="17px" Width="100px"></asp:TextBox>
               <asp:MaskedEditExtender ID="MEEmaxend" runat="server"
                        AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtmaxEnd">
                    </asp:MaskedEditExtender>
                     <asp:MaskedEditValidator ID="MaskedEditValidator5" runat="server" ControlExtender="MEEmaxend" ControlToValidate="txtmaxEnd"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  MustC\Break 1</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:CheckBox ID="chbxBrk" runat="server" /></td>
              <td class="style15">
                  Next Day</td>
              <td class="style16">
                  :</td>
              <td class="style18"><asp:CheckBox ID="chbNxtDy" runat="server" /></td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  &nbsp;</td>
              <td class="style14">
                  &nbsp;</td>
              <td class="style23">
                  &nbsp;</td>
              <td class="style15">
                  &nbsp;</td>
              <td class="style16">
                  &nbsp;</td>
              <td class="style18">
                  &nbsp;</td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18" align="right"><b>Grace Timings</b></td>
              <td class="style13">
                  &nbsp;</td>
              <td class="style14">
                  &nbsp;</td>
              <td class="style23">
                  &nbsp;</td>
              <td class="style15">
                  &nbsp;</td>
              <td class="style16">
                  &nbsp;</td>
              <td class="style18">
                  &nbsp;</td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  LateComming</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:TextBox ID="txtlateCom" runat="server" CssClass="textfield" Height="17px"
                        Width="100px" ></asp:TextBox>
                  <asp:CheckBox ID="cbxexclude" runat="server" Text="exclide" />
              </td>
              <td class="style15">
                  &nbsp;</td>
              <td class="style16">
                  &nbsp;</td>
              <td class="style18">
                  &nbsp;</td>
              <td>
                  &nbsp;</td>
          </tr>
          <tr>
              <td class="style18">
                  &nbsp;</td>
              <td class="style13">
                  EarlyGoing</td>
              <td class="style14">
                  :</td>
              <td class="style23"><asp:TextBox ID="txtErlyGoing" runat="server" CssClass="textfield" Height="17px"
                    Width="100px"></asp:TextBox>
                <asp:CheckBox ID="cbxexclude1" runat="server" Text="exclide" /></td>
              <td class="style15">
                  &nbsp;</td>
              <td class="style16">
                  &nbsp;</td>
              <td class="style18">
                  &nbsp;</td>
              <td>
                  &nbsp;</td>
          </tr>
      </table>

  </div>
   <div id="tabs1-js">

       <table class="style1">
           <tr>
               <td class="style18">
                   &nbsp;</td>
               <td class="style13">
                   &nbsp;</td>
               <td class="style21">
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
           </tr>
           <tr>
               <td class="style18">
                   &nbsp;</td>
               <td class="style13">
                   &nbsp;</td>
               <td class="style21">
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
           </tr>
           <tr>
               <td class="style18">
                   &nbsp;</td>
               <td class="style13">
                   Break2In</td>
               <td class="style21">
                   :</td>
               <td><asp:TextBox ID="txtB2In" runat="server" CssClass="textfield" Height="17px"
                        Width="100px"></asp:TextBox>
                    <asp:MaskedEditExtender ID="MEEb2in" runat="server"
                        AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                        MessageValidatorTip="true" TargetControlID="txtB2In">
                    </asp:MaskedEditExtender>
                     <asp:MaskedEditValidator ID="MaskedEditValidator6" runat="server" ControlExtender="MEEb2in" ControlToValidate="txtB2In"
                    InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></asp:MaskedEditValidator></td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
           </tr>
           <tr>
               <td class="style18">
                   &nbsp;</td>
               <td class="style13">
                   Break2Out</td>
               <td class="style21">
                   :</td>
               <td>
                   <asp:TextBox ID="txtB2Out" runat="server" CssClass="textfield" Height="17px"
                       Width="100px"></asp:TextBox>
                   <asp:MaskedEditExtender ID="MaskedEditExtender6" runat="server"
                       AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
                       MessageValidatorTip="true" TargetControlID="txtB2Out">
                   </asp:MaskedEditExtender>
                   <asp:MaskedEditValidator ID="MaskedEditValidator9" runat="server"
                       ControlExtender="MEEb2in" ControlToValidate="txtB2In" Display="Static"
                       InvalidValueBlurredMessage="Error" IsValidEmpty="true" MaximumValue="23:59">
                   &nbsp;&nbsp;
                   </asp:MaskedEditValidator>
               </td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
           </tr>
           <tr>
               <td class="style18">
                   &nbsp;</td>
               <td class="style13">
                   MustC\Break 2</td>
               <td class="style21">
                   :</td>
               <td>
                   <asp:CheckBox ID="ckbnyte" runat="server" />
               </td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
               <td>
                   &nbsp;</td>
           </tr>
       </table>

  </div>
 </div>
</div>
    </ContentTemplate>
    </asp:UpdatePanel></pre>
Posted
Updated 11-Oct-14 1:02am
v2
Comments
prasanna.raj 11-Oct-14 7:04am    
<script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="js/jquery.easytabs.min.js" type="text/javascript"></script>
<script src="js/jquery.hashchange.min.js" type="text/javascript"></script>

<script type="text/javascript">
//On Page Load
$(function () {
$("#tab-container").easytabs();
});
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
$("#tab-container").easytabs();
}
});
};
</script>


//HTml Code


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<div id="tab-container" class='tab-container'>
<ul class='etabs'>
<li class='tab'>Shift</li>
<li class='tab'>Options</li>
</ul>
<div class='panel-container'>
<div id="tabs1-html">

<table class="style1">
<tr>
<td class="style18">
 </td>
<td class="style13">
 </td>
<td class="style14">
 </td>
<td class="style23">
 </td>
<td class="style15">
 </td>
<td class="style16">
 </td>
<td class="style18">
 </td>
<td>
 </td>
</tr>
<tr>
<td class="style18">
 </td>
<td class="style13">
Shift Code</td>
<td class="style14">
:</td>
<td class="style23"><asp:TextBox ID="txtcode" runat="server" CssClass="textfield" Height="17px" Width="100px" autocomplete="off"></td>
<td class="style15">
Shift Name</td>
<td class="style16">
:</td>
<td class="style18"><asp:TextBox ID="txtname" runat="server" CssClass="textfield" Height="17px" Width="100px" autocomplete="off"></td>
<td>
 </td>
</tr>
<tr>
<td class="style18">
 </td>
<td class="style13">
Time IN</td>
<td class="style14">
:</td>
<td class="style23"><asp:TextBox ID="txtchkin" runat="server" CssClass="textfield" Height="17px" Width="100px">
<asp:MaskedEditExtender ID="MEEcheckin" runat="server" AcceptAMPM="false"
ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
MessageValidatorTip="true" TargetControlID="txtchkin" UserTimeFormat="TwentyFourHour">

<asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MEEcheckin" ControlToValidate="txtchkin"
InvalidValueBlurredMessage="Error" MaximumValue="23:59" IsValidEmpty="true" Display="Static"></td>
<td class="style15">
Time Out</td>
<td class="style16">
:</td>
<td class="style18"><asp:TextBox ID="txtchkout" runat="server" CssClass="textfield" Height="17px"
Width="100px">
<asp:MaskedEditExtender ID="MEEcheckout" runat="server"
AcceptAMPM="false" ErrorTooltipEnabled="true" Mask="99:99" MaskType="Time"
MessageValidatorTip="tr
Do you see any errors in console of developer tool?
prasanna.raj 12-Oct-14 23:58pm    
No, i'm using VS2008
I am asking about "console of developer tool". Have you seen Firebug in Firefox?

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