Javaapplet to show in flash

ok i have a page right now where u click on calendar…in html and it laods up a javascript calendar. i choose a data from it and it appears in the text box on the html page.

now my question is in flash if i design a page witha text box and say i click on the calendar button that loads up the javascript calendar…when i choose a date how may i send that back to the flash…i know if i use php and it sends from javascript to php there is no way to my knowledge to send the selected dat back to the flash via php…it needs like another button click…

how do i use a javascript applet like that and have the selection show in a dynamic text box in flash. a simple php dont work. its more then that…

Flash and Java are 2 different entities, I don’t believe they can communicate with eachother.

I could be wrong though :-\