0

Is there a way to find out whether the HTML page has completed loading?,

I have to do some combo box loading at the end of HTML page loading. Please help me to do this.

UPDATE :

my question is how to load some values after page is completely loaded not only the images,css, etc but also all the controls in it, like some text boxes may have values from the server and so on.

Best Regards

Java Questions
  • 7,813
  • 41
  • 118
  • 176

3 Answers3

2

Use a window.onload event handler in JavaScript.

marekful
  • 14,986
  • 6
  • 37
  • 59
  • yes this absolutely works to implementation please check http://www.gee.web.id/2016/11/how-to-execute-javascript-when-page-has.html – Gee Nov 06 '16 at 19:43
1

Have you tried this yet?

window.addEventListener("load", function() {
      // put stuff into combo boxes
});
Austin Mullins
  • 7,307
  • 2
  • 33
  • 48
1

Or in case you are using jQuery, use the classic:

jQuery(document).ready(function(){
    // combo box loading
}); 

I guess it will be also easier to reference the combo boxes if you use jQuery

LKallipo
  • 790
  • 10
  • 18