Ett litet exempel;
<script language="JavaScript" type="text/javascript">
function bildvaljare(){
var bildwin=window.open("","","width=200,height=200");
with(bildwin.document){
open();
write("<html><head><title>Bildväljare</title></head><body><form><select name='bild'><option value='1'>Bild 1</option><option value='1'>Bild 1</option></select><br><input type='button' value='Välj' onClick=\"window.opener.document.forms['myform'].elements['bildid'].value=this.form.bild[this.form.bild.selectedIndex].value; window.opener.document.forms['myform'].elements['beskrivning'].value=''; window.opener.document.forms['myform'].elements['beskrivning'].disabled=false; window.close();\"></form></body></html>");
close();
}
}
</script>
<form name="myform">
<input type="hidden" name="bildid">
Beskrivning: <input type="text" name="beskrivning" value="Välj en bild..." disabled><br>
<input type="button" value="Välj bild" onclick="bildvaljare();">
</form>