# Update HTML dialog when click another component

**URL:** <https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368>\
**Category:** Ruby API\
**Created:** [September 4, 2019, 7:32pm UTC](https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368 "2019-09-04T19:32:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freire\_Project](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@Freire\_Project](https://forums.sketchup.com/u/Freire_Project)\
**Post date:** [September 4, 2019, 7:32pm UTC](https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368/1 "2019-09-04T19:32:29Z")

</div>

Hello Everyone. Is it possible to update an html dialog box when I click on another component, just like Component Attributes or Component Options, do?  
I have a plugin where I have to click the “refresh” button to reload the page with the new parameters when the other component is selected and I want it to be updated automatically.

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [September 4, 2019, 7:41pm UTC](https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368/2 "2019-09-04T19:41:33Z")

</div>

yes…

but, how depends on the code we can’t see…

john

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [September 4, 2019, 7:53pm UTC](https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368/3 "2019-09-04T19:53:37Z")

</div>

You’ll need to use an observer …

> **[Class: Sketchup::SelectionObserver](https://ruby.sketchup.com/Sketchup/SelectionObserver.html)**
>
> This observer interface is implemented to react to selection events.

---

<div class="post-metadata">

**Author:** ![Freire\_Project](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@Freire\_Project](https://forums.sketchup.com/u/Freire_Project)\
**Post date:** [September 5, 2019, 2:10pm UTC](https://forums.sketchup.com/t/update-html-dialog-when-click-another-component/102368/4 "2019-09-05T14:10:28Z")

</div>

Thank you very much. Reading there i was able to do it
