Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
If it must be done prior to page onload use write() after onload use getElementById or similar.
With practice of putting js at end of body (or even higher), is waiting for onload obsolete ?
assets like images might not be fully loaded yet