grobar
Feb 11th 2007, 7:36 pm
I have a pop-up window where user uploads a file.
what is the best way to insert that value in to a textarea in the main page? The textarea has ID="tal"
phper
Feb 11th 2007, 8:35 pm
You can't access the 'value' attribute of an <input type="file"> with JavaScript, because of security reason. But if you can get the value from somewhere else (maybe let the file be uploaded first, then you have your server-side script pass back the user's local file name to a JavaScript variable), then you can do:
window.opener.document.getElementById("tal").value = theFileName;
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.