I'm not sure, but you may be able to just use
$("#filecontainer #choose_pic").click(function() {
// do something here
});
Either that or you could just add a <script>
tag into the iframe (if you have access to the code inside), and then use window.parent.DoSomething()
in the frame, with the code
function DoSomething() {
// do something here
}
in the parent.
If none of those work, try window.postMessage
. Here is some info on that.