Where should my script be within the document? Put the script at the beginning of the of the document, not at the end.