Multiple actions on the same modal

hello quick question, can i use the same modal to display error message on the event of error and a success message on the event of server success and how so.

lastly when i try to position a modal the goal being that a paragraph inside the modal must appear at a particular positon on my page, but i do this on the mobile view and when i view the page on my phone the paragraph is at a different position also when i landscape what could be the cause,

Hey @3244,

There are a few ways… One way is by using a variable.
Inside the Modal:

<div class="modal" id="modal_EventMsg" is="dmx-bs5-modal" tabindex="-1" show="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Modal title</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <dmx-value id="varEventMsg"></dmx-value>
                    <p dmx-text="varEventMsg.value">Modal body text goes here.</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
        </div>
    </div>


And your ServerAction’s events:
<dmx-serverconnect id="srvc_ProdList" url="dmxConnect/api/products/prod_read.php" dmx-param:catid="varCat.value.toNumber()" dmx-param:shortby="varShortBy.value" dmx-on:success="modal_EventMsg.varEventMsg.setValue('Success Event....')" dmx-on:error="modal_EventMsg.varEventMsg.setValue('Error Event....')"></dmx-serverconnect>

I can’t understand… Please post your code or screenshots and explain what is the problem