Questions tagged [onload-event]

212 questions
60
votes
2 answers

What setup code should go in Form Constructors versus Form Load event?

For winforms applications I'm wondering what setup code should go in: MainForm() as opposed to MainForm_Load(object sender, EventArgs e) Are there any best practice guidelines here?
Greg
  • 31,898
  • 75
  • 232
  • 424
55
votes
9 answers

JavaScript event window.onload not triggered

I've got the following code in a website: window.onload = resize; window.onresize = resize; function resize(){ heightWithoutHeader = (window.innerHeight - 85) + "px"; document.getElementById("main-table").style.height =…
user321068
46
votes
4 answers

iFrame onload JavaScript event

I have an iFrame, where I want to send a JavaScript command after loading. My current code looks like this: