document.getElementById("a_text_box").value = parent.frames.the_frame_with_the_select_box.docume nt.getElementById("the_select_box").selectedIndex;
If this works correctly, the text box value should be 0 if the first option is selected, 1 if the second, etc.
Sorry if this doesn't work, I haven't got the chance to try it. Sounds good to me, though!;)