# Question regarding onload

**URL:** https://forum.pinegrow.com/t/question-regarding-onload/4213
**Category:** Beginners
**Created:** [June 7, 2020, 9:33pm UTC](https://forum.pinegrow.com/t/question-regarding-onload/4213 "2020-06-07T21:33:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ladlon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/ladlon/32/928_2.png) [@ladlon](https://forum.pinegrow.com/u/ladlon)
#### Post date: [June 7, 2020, 9:33pm UTC](https://forum.pinegrow.com/t/question-regarding-onload/4213/1 "2020-06-07T21:33:46Z")

</div>

If I have an external .js file which my HTML file references/triggers, and inside that external .js file, I put all my coding inside a windows.onload = function(){}, will that onload know which html file it is supposedly waiting for the contents of to load, or would that onload have to be inside the html file (be in the same file that it is waiting to fully load the contents for)?

---

<div class="post-metadata">

### Author: ![ladlon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/ladlon/32/928_2.png) [@ladlon](https://forum.pinegrow.com/u/ladlon)
#### Post date: [June 11, 2020, 12:52pm UTC](https://forum.pinegrow.com/t/question-regarding-onload/4213/2 "2020-06-11T12:52:10Z")

</div>

Figured it out. Nevermind…
