views:

205

answers:

1

Hi, I have a modal popup extender which is triggered by gridview onRowCommand. The gridview and the modal popup extender is in different updatePanel. The panel which assigned to PopupControlID of the mpe contains a textbox and a button. This button will triggered a page method web service that will return a value to be assigned to the textbox. My problem is when I click the button, after partial post back, the mpe disapper (hide). I tried everything to make it show. Below is my code.

  function Completed(result) {

        //get the target textbox inside the mpe
        var txt = '<%= txtContractNo.ClientID  %>';
        var txtRef = document.getElementById(txt);

        txtRef.value = result;

        var mpeId = '<%= mpeContract.ClientID %>';
        $find(mpeId).show();
    }

How to make it show after partial post back? Thanks In advance

A: 

Try to trigger it after the partial post back using this code

<script type="text/javascript">
    // init the endRequest trigger
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(EndRequest);

    // inside here run your update code, open your box, what ever
    function EndRequest(sender, args) {
    }
</script>
Aristos