Javascript confirm from Flash?

Can it be done?

I mean, the Javascript **alert ** triggered from Flash works just fine.
But the confirm is the another pair of trousers: on cancel it does nothing, but on submit it sumbits the whole page! And I don’t want that - I just want to pass that information to Flash.

I guess it can be than done with multiple frames:

  1. first frame contains Flash+simple Javascript “transmitter” that transmits to another frame’s Javascript when triggered via Flash’s FSCommand
  2. second (probably hidden IFrame) contains the Javascript “receiver” that pops-up confirmation box. When submit is pressed, the second IFrame is being submitted and it sends that information to the “transmitter” which passes that info to Flash.

The question is: is there an easier solution?

Thanks.