Assuming that you have the url of the iframe, I'll continue from there.
Firstly, give your input box (again, assuming that you mean <input type="text" />) an ID, and then use the code below to fill the url into that input box.
// above is the code to get the url from your frame
// now we place that url into the input box:
document.getElementById("the_id_of_my_input_box").value = frameURL; // with frameURL defined earlier