View Full Version : Opening A .txt File Into A Textarea

09-24-2005, 04:28 AM

Using the asp upload method, how I bang the file on the server,
using file.getfilename and place that to a TEXTAREA?

The file must me selected from a list to choose the text file which you want to input. Then using the fso read the file and copy contents in text area.

I have this script, but not works:

<body onload="document.getElementById( 'idMyArea' ).value = document.frames[ 0 ].document.body.innerText;" >
<textarea name="txtMyArea" id="idMyArea"></textarea>
<iframe src="file:\\<%=Request.Form( "NameOfFileControl" )%> id="idMyFrame" style="display:none;"></iframe>

I would be very intrigued to see the solution.

Many Thanks for any assistance,


JLee :thumbsup: