ModalPop Disapear on pressing enter key (URGENT HELP)

Last post 10-18-2008 12:06 AM by gautam2u@gmail.com. 2 replies.

Sort Posts:

  • ModalPop Disapear on pressing enter key (URGENT HELP)

    10-17-2008, 5:29 AM

     Hi to all.

     

     Pls help me . Its URGENT

    i have an modalpop which is disappear whenever i pressed ENTER key on keyboard . I dont know how to fix this problem.

      my coding idea given below.

    <div id="DivOuter" runat="server" align="center" >

    <div id="DivInner" >

    <asp:Panel runat="server" ID="PanelPopUp" BackColor="#FFFFFF">

    <!---- Div to show Close Buttton ---------------------------->

    <div id="DivClose" runat="server" align="right" title="Move " onmouseover="this.style.cursor='move'" >

    <asp:UpdatePanel ID="UpdatePanel_GridView" runat="server" UpdateMode="Conditional">

            /// Image Button to Hide the ModalPopup

    </asp:UpdatePanel>

     <asp:UpdatePanel ID="UpdatePanel_GridView" runat="server" UpdateMode="Conditional">

        //  GRID VIEW to show the record

    </asp:UpdatePanel>

    <table>

      table contains four linkbutton , dropdown ,texxbox

    </table>

     

    </panel>

     </div>

     </div>

     

    --------------------
    S.K.Gautam
    New Delhi(INDIA)
    -------------------
    Please mark the answer if it helped you


  • Re: ModalPop Disapear on pressing enter key (URGENT HELP)

    10-17-2008, 11:57 AM

    gautam,

    It would be good practice to track down which control is intercepting the enter key and figure out why it is doing so.  In the meantime, however, you could try implementing the following script to just ignore the enter key:

     

        <script type="text/ecmascript" language="ecmascript">
        function blockEnterKey() {
            if (window.event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
            }
        }
        </script>
        <form id="form1" runat="server" onkeydown="blockEnterKey();">
        </form>
     

    James

    James Ashley, Magenic Technologies
    (james.ashley.magenic@gmail.com)
  • Re: ModalPop Disapear on pressing enter key (URGENT HELP)

    10-18-2008, 12:06 AM
    Answer

    Thanks vgiambattista for your reply .

     

       But i found the solution of probelm .

        the problem was appearing due the button control actually bydefault ONSUBMITBehaviour property was true so whenever i press enter key

        button_click event was executing.

       so i just set ONSUBMITBehaviour  of button control false . now my code is working properly.

     

    --------------------
    S.K.Gautam
    New Delhi(INDIA)
    -------------------
    Please mark the answer if it helped you


Page 1 of 1 (3 items)