This is a migrated thread and some comments may be shown as answers.

Assign Value through javascript in radmasked edit textbox

0 Answers 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
qw
Top achievements
Rank 1
qw asked on 15 Oct 2008, 12:13 PM
<%@ Page Language="C#" MasterPageFile="~/Template/TMSMaster.master" AutoEventWireup="true"
    CodeFile="AddEditShiftOTSettings.aspx.cs" Inherits="AddEditShiftOTSettings" Title="Untitled Page" %>

<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="radI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="JavaScript" src="./JS/CommonValidation.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
function NumbersOnly(e)
        {
           
            var unicode=e.charCode? e.charCode : e.keyCode    
            if (unicode!=8)
            {
            
             if (unicode < 48 || unicode > 57)
                {
            if(unicode == 9 || unicode==46)            
                        return true;
                    else                    
                        return false;
                }
            }
        }
//        function AssignStartValueToEnd()
//        {
//            var    i = document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'hidcount').value;           
//            var j;
//            for(j=3;j<=i;j++)            
//            {    
//                if(j<10)
//                    j = '0' + j;
//                                                 
//                var STime=document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtTimeIn').value;                
//                 var StartHours = STime.substr(0,2)
//                 var StartMinutes = STime.substr(2,2)
//                 var result = StartHours + ":" +  StartMinutes;
//                document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtTimeOut').value = result;
//                
//            }
//        }
        function StartEndTime()
        {    
            
            var    EarCnt = document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'hidcount').value;           
            var j;
            for(j=3;j<=EarCnt;j++)            
            {    
                if(j<10)
                    j = '0' + j;                              
                var StartTime=document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtTimeIn').value;
                var EndTime=document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtTimeOut').value;
                var StartHours = StartTime.substr(0,2)
                var StartMinutes = StartTime.substr(3,2)
                var EndHours = EndTime.substr(0,2)
                var EndMinutes = EndTime.substr(3,2)                                    
                if(document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'chkDayChange').checked == true)                        
                {                           
                      if(StartTime < EndTime)
                    {
                        alert('Invalid Time... start time must be greater then end time');                              
                      
                    }
                    else
                    {
                        var h=(StartHours - EndHours)                       
                        var m=(StartMinutes -EndMinutes)
                            if (h < 10)
                                h='0'+ h
                            if(m < 10)
                                m ='0' + m
                        var diff= h +'.'+ m                        
                        document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtNWhours').value=diff;
                    }                                               
                }                        
                else
                {            

                    if(EndTime < StartTime)
                    {
                        alert('Invalid Time... End Time must be greater then start time');                              
                      
                    }
                    else
                    {
                         var h1=(EndHours-StartHours)                         
                         var m1=(EndMinutes-StartMinutes)
                        if (h1 < 10)
                            h1='0'+ h1
                        if(m1 < 10)
                            m1 ='0' + m1
                        var diff1= h1 +'.'+ m1                                             
                        document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'txtNWhours').value=diff1;
                    }                            
                }
            }
        }
        
        function OnChangeEventValue(dropdown)
        {
            var myindex  = dropdown.selectedIndex
            var SelValue = dropdown.options[myindex].value
        
            if(SelValue > 0)
            {
                var Phottype=document.getElementById('<%= ddlPhOtType.ClientID %>').value;    
                          
                if(Phottype ==0)
                {
                    alert("Select PH OT Type");                    
                    return false;
                }
                else
                {
                return true;
                }
                      
            }
        }
            function CompareDropdown()
            {        
                var PhExtra=document.getElementById('<%= ddlPhExtra.ClientID %>').value;
                var Phottype=document.getElementById('<%= ddlPhOtType.ClientID %>').value;
                if(Phottype ==0  &&  PhExtra >0)
                {
                    alert("Select PH OT Type");
                    return false;
                }
                else
                {
                        
                        var    EarCnt = document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'hidcount').value;    
                        var j;
                        for(j=3;j<=EarCnt;j++)            
                        {  
                            if(j<10)
                            j = '0' + j;   
                            var ottype=document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'ddlOtType').value                               
                            var Extraottype=document.getElementById('ctl00$' + 'ContentPlaceHolder1' + '$' + 'dgOtSettings$ctl' + j + '$' + 'ddlExtraOTType').value
                            if(ottype ==0 && Extraottype >0)
                            {
                                alert("Select Ph OT Type")
                                return false;
                            }
                            else
                            {
                                return true;
                            }
                        }
                }
                      
            }    
        
    </script>

    <table border="0" cellpadding="0" cellspacing="0" class="text" width="95%">
        <tr>
            <td height="8">
            </td>
        </tr>
        <tr>
            <td class="header">
                Manage Master &gt; TMS Management &gt; <span class="headerbold">
                    <asp:Label ID="lblHeader" runat="server"></asp:Label></span></td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="8" colspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td width="100%">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableline">
                                <tr>
                                    <td width="311">
                                        <table width="148" border="0" align="left" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="27%">
                                                    <a href="ListShiftOtSettings.aspx" title="Click here & see the shift ot setting">
                                                        <img border="0" src="images/listab2.gif" width="72" height="29" /></a></td>
                                                <td style="width: 4%">
                                                    &nbsp;</td>
                                                <td width="69%">
                                                    <a>
                                                        <img runat="server" id="imgaddtab" border="0" height="29" src="images/addnewtab1.gif"
                                                            width="72" /></a></td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="275">
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="border-light">
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelistbg">
                    <tr>
                        <td height="8">
                            <%--<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                ShowSummary="False" HeaderText="Please enter require fields as define below." />--%>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblMessage" CssClass="message" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="border-cyancolour">
                                <tr>
                                    <td align="right" bgcolor="#3498EB" class="whitetext" width="95%">
                                        <span class="redtext">*</span> Required Field
                                    </td>
                                </tr>
                                <tr>
                                    <td bgcolor="#3498eb">
                                        <table align="center" border="0" cellpadding="0" class="text border-cyancolour" width="95%">
                                            <tr>
                                                <td width="25%">
                                                    &nbsp;</td>
                                                <td align="right" colspan="3">
                                                    &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td class="tdevenraw">
                                                    <span class="redtext">*</span> Shift</td>
                                                <td class="tdoddraw">
                                                    <asp:DropDownList ID="ddlShift" runat="server" CssClass="inputtextbox" ToolTip="Select Shift">
                                                    </asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="ddlShift"
                                                        Display="Dynamic" ErrorMessage="Select Shift" InitialValue="0"></asp:RequiredFieldValidator>
                                                </td>
                                                <td class="tdevenraw">
                                                    PH OT Type</td>
                                                <td class="tdoddraw">
                                                    <asp:DropDownList ID="ddlPhOtType" runat="server" CssClass="inputtextbox" ToolTip="Select Ph ot type">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdevenraw">
                                                    PH Max OT Hours
                                                </td>
                                                <td class="tdoddraw">
                                                    <radI:RadMaskedTextBox ID="txtPhMaxOTHours" runat="server" Skin="WebBlue" Mask="<0..23>.<0..60>"
                                                        CssClass="inputtextbox-small" CatalogIconImageUrl="" Description="" Text="00.00"
                                                        Title="" TitleIconImageUrl="" TitleUrl="" ToolTip="Enter Ph max ot hours" onblur="copystarttime();"
                                                        DisplayPromptChar="_" PromptChar="_" RoundNumericRanges="False" Width="50"></radI:RadMaskedTextBox>
                                                </td>
                                                <td class="tdevenraw">
                                                    PH Extra OT Type</td>
                                                <td class="tdoddraw">
                                                    <asp:DropDownList ID="ddlPhExtra" runat="server" CssClass="inputtextbox" ToolTip="Select Ph extra ot type"
                                                        onchange='return OnChangeEventValue(ctl00$ContentPlaceHolder1$ddlPhExtra);'>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="25%">
                                                    &nbsp;</td>
                                                <td align="right" colspan="3">
                                                    &nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table>
        <tr>
            <td>
                <br />
            </td>
        </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="95%" bgcolor="#3498EB">
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%" class="text border-cyancolour">
                    <tr>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <div style="overflow: scroll; width: 900px">
                                <asp:DataGrid ID="dgOtSettings" runat="server" AllowPaging="True" BorderColor="#FFFFFF"
                                    BorderWidth="1px" AllowSorting="True" AutoGenerateColumns="False" Width="95%"
                                    ToolTip="ot settings" OnItemDataBound="dgOtSettings_ItemDataBound">
                                    <PagerStyle Font-Bold="True" BackColor="#3399FF" ForeColor="White" HorizontalAlign="Right"
                                        Mode="NumericPages" />
                                    <AlternatingItemStyle CssClass="evenraw" />
                                    <ItemStyle CssClass="oddraw" Wrap="False" />
                                    <HeaderStyle CssClass="gridheaderstyle" ForeColor="White" Wrap="False" />
                                    <Columns>
                                        <asp:TemplateColumn HeaderText="Day">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblDay" runat="server" ToolTip="Days" Text='<%# DataBinder.Eval(Container.DataItem, "Day") %>'
                                                    Width="61px"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="OT Type">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <asp:DropDownList ID="ddlOtType" CssClass="inputtextbox" runat="server" ToolTip="Select Ot Type">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Max OT Hours">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <span class="redtext">*</span><radI:RadMaskedTextBox ID="txtMaxOtHours" runat="server" Skin="WebBlue" Mask="<0..23>.<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Max Ot Hours"
                                                    Width="50"></radI:RadMaskedTextBox>
                                                     <br />
                                                <asp:RequiredFieldValidator ID="rfvMaxOTHours" runat="server" ControlToValidate="txtMaxOtHours"
                                                    Display="Dynamic" ErrorMessage="Enter MaxOT Hours" InitialValue="00.00"></asp:RequiredFieldValidator>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Time In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <span class="redtext">*</span><radI:RadMaskedTextBox ID="txtTimeIn" runat="server"
                                                    Skin="WebBlue" Mask="<0..23>:<0..60>" CssClass="inputtextbox-small" CatalogIconImageUrl=""
                                                    TitleUrl="" ToolTip="Time In" Width="50"></radI:RadMaskedTextBox>
                                                <br />
                                                <asp:RequiredFieldValidator ID="rfvTimeIn" runat="server" ControlToValidate="txtTimeIn"
                                                    Display="Dynamic" ErrorMessage="Enter TimeIn" InitialValue="00:00"></asp:RequiredFieldValidator>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Time Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <span class="redtext">*</span><radI:RadMaskedTextBox ID="txtTimeOut" runat="server"
                                                    Skin="WebBlue" Mask="<0..23>:<0..60>" CssClass="inputtextbox-small" CatalogIconImageUrl=""
                                                    TitleUrl="" ToolTip="TimeOut" Width="50" onblur='StartEndTime();'></radI:RadMaskedTextBox>
                                                <br />
                                                <asp:RequiredFieldValidator ID="rfvTimeOut" runat="server" ControlToValidate="txtTimeOut"
                                                    Display="Dynamic" ErrorMessage="Enter TimeOut" InitialValue="00:00"></asp:RequiredFieldValidator>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Day Change?">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkDayChange" runat="server" ToolTip="Day Change" onclick='StartEndTime();' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="NW Hours">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtNWhours" runat="server" Skin="WebBlue" Mask="<0..23>.<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="NW Hours"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Day Type">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <span class="redtext">*</span><asp:DropDownList ID="ddlDayType" runat="server" CssClass="inputtextbox"
                                                    ToolTip="Select Day Type">
                                                    <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                    <asp:ListItem Text="Working Day" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="Half Day" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Week Off Day" Value="3"></asp:ListItem>
                                                </asp:DropDownList>
                                                <br />
                                                <asp:RequiredFieldValidator ID="rfvWDays" runat="server" ControlToValidate="ddlDayType"
                                                    Display="Dynamic" ErrorMessage="Select Working Day" InitialValue="0"></asp:RequiredFieldValidator>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Extra OT Type">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <asp:DropDownList ID="ddlExtraOTType" runat="server" CssClass="inputtextbox" ToolTip="Select Extra Ot Type">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break1 Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak1Out" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break1 Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break1 In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak1In" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break1 In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break2 Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak2Out" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break2 Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break2 In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak2In" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break2 In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break3 Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak3Out" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break3 Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break3 In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak3In" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break3 In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break4 Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak4Out" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break4 Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Break4 In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtBreak4In" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Break4 In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Dinner Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtDinnerOut" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Dinner Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Dinner In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtDinnerIn" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Dinner In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Lunch Out">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtLunchOut" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Lunch Out"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Lunch In">
                                            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                Font-Underline="False" Wrap="False" />
                                            <ItemTemplate>
                                                <radI:RadMaskedTextBox ID="txtLunchIn" runat="server" Skin="WebBlue" Mask="<0..23>:<0..60>"
                                                    CssClass="inputtextbox-small" CatalogIconImageUrl="" TitleUrl="" ToolTip="Lunch In"
                                                    Width="50"></radI:RadMaskedTextBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateColumn>
                                    </Columns>
                                </asp:DataGrid>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="height: 22px">
                            <input id="hidcount" runat="server" name="hidear" size="3" type="hidden" value="0" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="8" valign="middle" align="center">
                            <asp:ImageButton ID="btnSave" AlternateText="Save" ImageUrl="./images/save-btn.gif"
                                ToolTip="Click to save the shift ot settings" runat="server" OnClick="btnSave_Click" />
                            <asp:ImageButton ID="btnReset" AlternateText="Reset" ImageUrl="./images/reset-btn.gif"
                                ToolTip="Click to reset form" runat="server" CausesValidation="False" OnClick="btnReset_Click" />
                            <asp:ImageButton ID="btnCancel" AlternateText="Cancle" ImageUrl="./images/cancel-btn.gif"
                                ToolTip="Click to cancle and go back to main page" runat="server" CausesValidation="False"
                                OnClick="btnCancel_Click" /></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="5" style="height: 22px">
                &nbsp;
            </td>
        </tr>
    </table>
    <br />
</asp:Content>







this is my code
i want to assign "diff"  value in RadMaskedTextBox  with using javascript...
basically diff is nothing but just take one variable for store value after subtracting time ion and time out nd i want to assign this value to RadMaskedTextBox    but in my case error not come but value not assign particular RadMaskedTextBox  and this is used for time in and time out difference calculation ..

please help me

Thanks in advance

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
qw
Top achievements
Rank 1
Share this question
or