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 Oct 29, 2004 | 06:25 PM
  #1  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
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 ?
Reply
Old Oct 29, 2004 | 06:38 PM
  #2  
boxst's Avatar
boxst
Scooby Regular
 
Joined: Nov 1998
Posts: 11,905
Likes: 0
Default

Hello

I believe it is not allowed.

Steve.
Reply
Old Oct 29, 2004 | 06:41 PM
  #3  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Default

cheers Steve
Reply
Old Oct 29, 2004 | 08:13 PM
  #4  
Iain Young's Avatar
Iain Young
Scooby Regular
 
Joined: Sep 1999
Posts: 6,956
Likes: 0
From: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Default

Nope, you can't do it. It's one of those security restrictions that make life so easy
Reply
Old Oct 29, 2004 | 08:46 PM
  #5  
SJ_Skyline's Avatar
SJ_Skyline
Scooby Senior
 
Joined: Apr 2002
Posts: 21,922
Likes: 2
From: Limbo
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.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
PetrolHeadKid
Driving Dynamics
10
Oct 5, 2015 05:19 PM
bluebullet29
General Technical
2
Sep 27, 2015 07:52 PM
StueyBII
General Technical
4
Sep 26, 2015 12:35 PM
StueyBII
General Technical
0
Sep 25, 2015 05:58 PM




All times are GMT +1. The time now is 11:54 PM.