setting the value of a file object
I have a control on me screen of type <FILE>. I want to set some value to that object from the database. I tried the following code using html.
<input type="file" value="hello" id="j" />
<input type="button" onclick="alert(document.getElementById('j').value) ;"
<input type="button" onclick="fun();"
but none of the above showed proper values for alert. it was showing null.
If I'm entering some values into the file field manalyy then proper alert is coming.
If I change the file type to text, then it is setting the value in the textfield with the value in the value attribute.
So my question is how to I set the value into the <FILE> type through the code implicitly.