# Get Plugin dimension on ready and resize event

**URL:** <https://forums.creativeclouddeveloper.com/t/get-plugin-dimension-on-ready-and-resize-event/5130>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [August 26, 2022, 4:27am UTC](https://forums.creativeclouddeveloper.com/t/get-plugin-dimension-on-ready-and-resize-event/5130 "2022-08-26T04:27:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishu-pixofix](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nishu-pixofix](https://forums.creativeclouddeveloper.com/u/nishu-pixofix)\
**Post date:** [August 26, 2022, 4:27am UTC](https://forums.creativeclouddeveloper.com/t/get-plugin-dimension-on-ready-and-resize-event/5130/1 "2022-08-26T04:27:25Z")

</div>

Hello,

My UXP Plugin with Vanilla JS has a `sp-body` in which I’m fetching content using `XMLHttpRequest` and showing the response using `innerHTML`.

Now I have set fixed dimension for that, but how can I set the width and height dynamically to match the Plugin Panel in case of resize? Can I get the width and height value with events like `onload` and `onresize` like we used to do in JS? thanks!
