Is there a way to clear the window.onload queue?

jamesbcox1980 used Ask the Experts™
I have an invoice page that is automatically generated by some server-side vbscript.  The script generates and onLoad attribute for the body tag, but I don't want this function to fire if the page is loaded from an Admin page.

So, my question is, how do I either clear the window.onload queue or remove the statements from the function it fires?

1. Page begins loading
2. Body Tag sets a pagePrint() function to the onLoad queue
3. script checks to see if page came from the Admin center
    3a. If it was, remove the pagePrint() function from the queue and perform other functions
    3.b If not, leave the queue alone and do nothing.
4. Page finishes loading, and fires the window.onload queue

I can program everything else, I just need to know how to stop something from firing.  I have no control over the Body tag, since this is eCommerce software.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

You should be able to cleaer it by replacing it. If memory serves me you can do this.


<script for=window event=onload>

Open in new window


Thanks that worked great!


I tried setting it to nothing, but that didn't work.  This worked fine.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial