How to Show Confirm Dialog in a WebDev Looper with AWP

image

I recently had a situation where I had a looper displaying images, each having a delete button. This delete button would actually delete the image file from the server, so I needed a way to confirm the action. In AWP you can’t use the YesNo or Confirm functions in the server code but actually is very easy performing this in the browser code.

image

The important bit of code is the RETURN when the user selects No on the dialog. This RETURN will cause the browser not to execute the server code.

This is very handy to remember as there are many times when its good practice to get user conformation.

WebDev – Creating Opaque backgrounds without affecting Text

In WebDev if you create a cell and set its background and opacity then the elements within the cell will also appear with the same opacity.

This is not great when you want to show text with say a crisp white colour. So how do you produce the effect without affecting the text?

Firstly you need to add an image control, set its Type to Generated.

image

Also make sure that you select “The control can be overlaid” on the image and then add a cell over the text. I usually set a background colour to the image to help me work with it in design.

Add a text control to the cell and set some text. Note that the Cell control also needs to be set as “The control can be overlaid”.

image

Even though you set the background of the image you still need to generate a new background with the opacity. Its easy and only requires a few lines of code.

image

Note that you have to make sure the shape of the background is set to Solid Background for this to work.

Copyright FUNCODER 2019
Shale theme by Siteturner