Welcome to WebmasterWorld Guest from 184.108.40.206
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