It has to be in UploadHandler.aspx. The UploadManager control is a container for the upload handler page, using an iframe. This unique architecture is what allows SlickUpload to trap all errors that occur during uploads and provide user feedback for them, rather than displaying page not found errors for oversized uploads like all other upload controls.
What are you trying to accomplish with the javascript? Maybe I can suggest another way to accomplish your goal.