How do I call a custom function from outside jQuery...

How do I call a custom function from outside jQuery...

Basically I have an iFrame on a page with a form. Once the form is submitted I want the my parent page to update to display the new item

In the main page I have a function inside my $(document).ready() called loader() that does all the ajax to populate the main page.

I had hoped I could call self.parent.loader() from the iFrame so that it would update the listing, but this doesn't work.

Does anyone know how I make a call to a function in the parent page document.ready section.

Thanks