sorry I dont really understand your question, but inter-frame actions work something like this:
$('#button').click(function(){ $("#divInParentFrame",top.document).remove(); }); read up on jquery's selectors and additional parameters, its all in the documentation. notice the comma after the element selector, that's where you address the frame to which you want to talk to