[thelist] changing link text on-the-fly with JavaScript

Chris Marsh chris at ecleanuk.com
Fri Mar 7 10:00:00 CST 2003

> >from what I understand about what you want, I'm not certain it's
> >possible, for security reasons.
> >
> >file upload boxes are generally a don't-touch area for JavaScript
> >because if it was possible to manipulate them, then a sneaky
> webmaster
> >could grab a copy of your files without you knowing.
> I tried a variation on the code Chris sent, and you are
> right, I got an "Access Denied" error when trying to get at
> the value of the file upload field. I guess I will have to go
> with a server-side solution for this. Thanks to both of you
> for your help!

No problem. The following is an example of how you may get the value of
a "file" field.

		<form method='post' action='test.htm' name='fForm'
			File: <input type='file' name='fFile' />

As I said before, you can read the value, just not write it. I've tested
the code above, with results as anticipated (ie, I get the path to the
file selected).


Chris Marsh

More information about the thelist mailing list