Could anyone please help me on method init()? How does it work?
What is difference between onload and init methods? Please give an example where onload fails to load script and init works instead. What is syntax of using it? Please include examples for both IE and FF.
If you could just provide me very detailed tutorial or name of book on the init method and its uses, it would be great help. Could you please guide me on this regard?
Thank you Gumape. Thanks for looking into it.
Is init() used as standard function name for initialization?
Please see the below examples/links where the confusion aroused.
Thank you so much Gumape!!!!! That was a lot help on this topic, Gumape. Everything is clear to me now on init().
Lots of smiles for you from my end
:):):):):):D:D:D:D:cool::cool::cool::cool: :afro: :afro::flippy::flippy::nanaman::nanaman:
The onload event occurs when an object has been loaded. The onload event for the body (or window) fires after all objects in the DOM hierarchy (images, ...) have finished loading and the document object has been built up. At that point, you can access the elements of the document (such as getElementById, getElementsByName), you can manipulate the contents of the document, etc.
There are some other events related to the onload event: onreadystatechange, DOMContentLoaded, onbeforeunload, onunload.
For further details and examples please see the following page: