locked
buttons on a modal dialog box RRS feed

  • Question

  • hi i have a doubt on buttons on a modal dialog box
    i have a screen 1.aspx on which if i click on a button, a modal dialog box screen will appear.
    On this modal dialog box screen, there are 2 buttons Ok and Cancel.
    If i click on Cancel button, the modal dialog box should get closed, displaying 1.aspx
    If i click on Ok button, it should call another fucntion(to insert data to db, which i already have) and then the modal dialog hsould get closed.

    For the cancel button i done like this ..

    in the page_load section i mentioned like ..
    CancelButton2.Attributes.Add("OnClick", "javascript:screenclose();");

    and in the .aspx page i mentioend like this

    <script type="text/javascript" language="javascript">

    function screenclose()

    {

    window.close();

    }

    </script>

    But rather than closing itself, its opening some other web pages !

    Monday, February 9, 2009 12:46 PM

All replies

  • You keep posting off topic questions to this forum.  Questions about ASP should be posted to forums.asp.net
    Hans Passant.
    Monday, February 9, 2009 1:07 PM