Ah thanks Pong. This looks like what I need, but I'm having trouble getting it working. If I try to use:
document.getElementById("REQUEST:EXTFLDV_500221").value
I find that no data is passed (eg. executing alert(document.getElementById("REQUEST:EXTFLDV_500221").value) produces a blank popup)
But looking at the ViewSource shows that there's value data for this field.