Okay, I'm developing a small plugin and it's got some fields in the edit post/page screen. I've got an URL field where I'd like to make this kind of thing: user clicks a button, gets a list of attachments to the current post or page, selects one and its URL appears in the URL box. Are there any wordpress functions for this or do I have to hard-code?
Thanks,
~ k