155
Views
2
Comments
Reactive App - Remove HTML Element solution
Question

Hi All

I have an idea to create a feature manage uploading images, like that sample below :

The problem here, I can not figure out the way to click on button-icon delete. Then implement a function to remove that image in the page. I mean to remove the html element. 

As we saw above, if we using javascript, it's easy to create a event onlick at the button-icon with param "this", then using function (this).parentElement().remove() to remove the parent "div" contain image. But with outsystems, I don't have any idea.

Do you guy have any idea on my situation? Please help me give a solution.

2025-12-23 12-24-14
Adão Pedro

duy huynh wrote:

Hi All

I have an idea to create a feature manage uploading images, like that sample below :

The problem here, I can not figure out the way to click on button-icon delete. Then implement a function to remove that image in the page. I mean to remove the html element. 

As we saw above, if we using javascript, it's easy to create a event onlick at the button-icon with param "this", then using function (this).parentElement().remove() to remove the parent "div" contain image. But with outsystems, I don't have any idea.

Do you guy have any idea on my situation? Please help me give a solution.

 

 Hi I made an example ve if this helps.

best regards

Exampleapp.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Duy,

The mentioned scenario can be implemented in low code way

See this sample app - UploadImageWithDelete

Note: If the implementation is possible with Low code then avoid using JS implementation

Refer the attached .oml solution

If you are referring the image from Database table i.e. want to delete the image from Database then refer Adão Pedro solution as well

Hope this helps you!


Regards,

Benjith Sam

ReactiveUploadImage.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.