# Reloading/resetting a webdialog widget

**URL:** <https://forums.sketchup.com/t/reloading-resetting-a-webdialog-widget/21025>\
**Category:** Ruby API\
**Tags:** sketchup, dialog, sketchup-2016\
**Created:** [February 25, 2016, 10:35am UTC](https://forums.sketchup.com/t/reloading-resetting-a-webdialog-widget/21025 "2016-02-25T10:35:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prz87](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@prz87](https://forums.sketchup.com/u/prz87)\
**Post date:** [February 25, 2016, 10:35am UTC](https://forums.sketchup.com/t/reloading-resetting-a-webdialog-widget/21025/1 "2016-02-25T10:35:47Z")

</div>

Hi Everyone!  
Need a little help with reloading/resetting webdialogs.  
So I have a webdialog as a widget . It currently shows some basic info like a jquery meter and total face counts and measurements.  
I need this widget to update itself when I load a new skp file or when I switch between active windows to show relevant information for the active windows.

Is there anyway to achieve this?  
Thanks for any response or clues.

---

<div class="post-metadata">

**Author:** ![thomthom](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/thomthom/32/12606_2.png) [@thomthom](https://forums.sketchup.com/u/thomthom)\
**Post date:** [February 25, 2016, 3:05pm UTC](https://forums.sketchup.com/t/reloading-resetting-a-webdialog-widget/21025/2 "2016-02-25T15:05:44Z")

</div>

You’d have to use observers to monitor when models are being opened/created. Then from the observer call your webdialog with the info it needs to update the content.

---

<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:** [February 26, 2016, 12:56am UTC](https://forums.sketchup.com/t/reloading-resetting-a-webdialog-widget/21025/3 "2016-02-26T00:56:49Z")

</div>

**`AppObserver`**  
[http://www.sketchup.com/intl/en/developer/docs/ourdoc/appobserver](http://www.sketchup.com/intl/en/developer/docs/ourdoc/appobserver)

And for the Mac the it’s recent **`onActivateModel`** callback:  
[http://www.sketchup.com/intl/en/developer/docs/ourdoc/appobserver#onActivateModel](http://www.sketchup.com/intl/en/developer/docs/ourdoc/appobserver#onActivateModel)  
works with v2015 and higher only
