Change contents in frame when string found in other frame
I'm trying to do the following but I have no clue how to start :
1) I want to have a page with 2 frames; in one frame (Frame_A) I would put something like "Please submit all required data in the fields below".
2) In the other frame (Frame_B) I would load an external site where I have no control over what is happening, and where people need to fill in several pages of data
3) In the end that other site will say something like "Thanks for your cooperation"
What I want is that at the moment that this second frame (Frame_B) contains the text "Thanks for your cooperation" I could load my own "Thank you" page in Frame_A.
So basically I don't want people to see my "thank you"-page as long as they have not filled in the data in that site where I have no control over what is happening other than a message that I should be able to intercept.
Is this possible ? I would need a rather detailed answer since I'm not too experienced with scripts and stuff.
Thanks a lot for your help.