[thelist] type=file query

jon steele jjsteele22 at yahoo.com
Mon Aug 19 14:49:01 CDT 2002


The type="file" field has many extra restrictions, unlike other form fields.

One is that you can not set it's value using a value attribute. Second, you have limited access to
its attributes via javascript (no, you can't set the value using js either ;).

These security restrictions have been implemented so a malicious website does not just set the
value of the form field to whatever they want, then use javascript to submit the form without the
user knowing. If this was allowed sites would be upping whatever file they wanted from anyone!

HTH

--- Anil Garg <anilg at niksun.com> wrote:
> Hi,
> As in case of  text type we use
>
> <input type="text" name="name" size="20" value="anil">
>
> and it prints 'anil' in the text area.
>
> how can we achieve similar think in type ="file"
>  i tried :
> <input type = 'file' name = 'hyper' value = 'anil' >
> but i doesnt work!!
>
> regards
> anil
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the thelist mailing list