Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
<asp:ModelPopoupExtender DialogBox  runat="server" ID="Dialog" Title="Carriage Charge" SaveButtonText="Apply" PopupDisplayMode="Normal"  CancelButtonUsePostBack="false" TitleIconUrl="/App_Themes/Theme/Icons/lorry_flatbed.png" >
    <MainContent >
        
        <script type="text/javascript">
        <!--
            $.pageLoaded(null, function () {
                console.log("Page Loaded Carriage Change");
                var CarriageDialogBox = $find('<%= Dialog.DialogBoxBehaviorID %>');
                if (CarriageDialogBox != null) {
                    console.log(CarriageDialogBox);
                    CarriageDialogBox.add_shown(function () {
                        console.log("Add Shown");
                        $("#<%= CarriageChargeDecimalTextBox.ClientID %>").focus();
                    });
                }
            });
        //-->
        </script>

        <fieldset style=" margin:0px; padding-removed5px; padding-removed20px; padding-removed20px;">
            <table width="100%" cellspacing="10" >
            <col width="120px" />
            <col />
                <tr>
                    <th><web:Label  runat="server" ID="CarriageChargeLabel" AssociatedControlID="CarriageChargeDecimalTextBox" Text="Carriage Charge" /></th>
                    <td><web:DecimalTextBox  runat="server" ID="CarriageChargeDecimalTextBox" AllowEmpty="false" Height ="20px" /></td>
                </tr>
            </table>
        </fieldset>
    </MainContent>
</asp:ModelPopoupExtender>


In above Jquery code I used console.log() method to debug in the console of the browser
This Method not invoke into and the Focus() Method also not invoke.
console.log("Add Shown");.

If there any other way to achieve the same thing , your suggestions are most welcome.
Posted
Updated 13-Apr-15 21:52pm
v3

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