how does a javaScript that works as follows: click on button it opens a popup where user can add an url, and adds it to a textarea in the same form?

^just like the buttons on these vB forums?

I have a javascript book, but havent had time to study it yet