Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

<input> tag - if its type="file" can you set a value ?

Thread Tools
 
Search this Thread
 
Old 29 October 2004, 06:25 PM
  #1  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Default <input> tag - if its type="file" can you set a value ?

I have an input tag, type="file"

I'd like to pre-set it with a value eg.

<input type="file" value="dog.jpg">

which would make an input box appear, with a browse button. Inside the box would be the value "dog.jpg"

can't get it to work - do I take it its not possible ?
Old 29 October 2004, 06:38 PM
  #2  
boxst
Scooby Regular
 
boxst's Avatar
 
Join Date: Nov 1998
Posts: 11,905
Likes: 0
Received 0 Likes on 0 Posts
Default

Hello

I believe it is not allowed.

Steve.
Old 29 October 2004, 06:41 PM
  #3  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Default

cheers Steve
Old 29 October 2004, 08:13 PM
  #4  
Iain Young
Scooby Regular
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Default

Nope, you can't do it. It's one of those security restrictions that make life so easy
Old 29 October 2004, 08:46 PM
  #5  
SJ_Skyline
Scooby Senior
 
SJ_Skyline's Avatar
 
Join Date: Apr 2002
Location: Limbo
Posts: 21,922
Likes: 0
Received 1 Like on 1 Post
Default

As above, you definitely can't do this. I had a client that wanted to do it, it would be a security hole in HTML if it was possible.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
PetrolHeadKid
Driving Dynamics
10
05 October 2015 05:19 PM
bluebullet29
General Technical
2
27 September 2015 07:52 PM
StueyBII
General Technical
4
26 September 2015 12:35 PM
StueyBII
General Technical
0
25 September 2015 05:58 PM



Quick Reply: <input> tag - if its type="file" can you set a value ?



All times are GMT +1. The time now is 07:27 AM.