locked
Confirmation MessageBox Position. RRS feed

  • Question

  • User1266884534 posted

    Hello Everyone,

    I have a delete button that prompts for user confirmation prior to proceeding with the action. The position of the messagebox is awkward. This prompt is created at the top of the browser near the address bar. Is there some way of bringing it in the center of the screen?

    This is the code for the messagebox.

    <asp:ImageButton CausesValidation="false" CommandName="Delete" ID="ImgButtonDelete"
                                                    Visible='<%#Bind("CanDelete") %>' ImageUrl="~/App_Themes/RAMTheme/images/Delete.gif"
                                                                 OnClientClick=" return confirm('Are you sure you want to delete this asset?'); " runat="server" />
                                            </It

    alert box position

    Friday, May 1, 2020 3:06 PM

Answers

  • User475983607 posted

    Is there some way of bringing it in the center of the screen?

    No.  Confirm is a browser feature.  You'll need to find a JavaScript library if you want to control the positioning. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 1, 2020 4:04 PM