Javascript: window.onload problem

Posted by Matrym on Stack Overflow See other posts from Stack Overflow or by Matrym
Published on 2010-04-29T09:09:53Z Indexed on 2010/04/29 9:17 UTC
Read the original article Hit count: 288

Filed under:
|
|
|

This isn't working in IE (although it does work in FFX). Why?

Using HTML in the header:

<script type="application/javascript">

    // And finally, let's call the code ourselves.
    window.onload = lbp.init;

</script>

And then the script:

// lbp is the script's universal variable, which retains everything
var lbp = {};

// The sequence of functions to trigger
lbp.init = function() {
    alert('hi');
}

Thanks in advance for your help =)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about window