[HTML] Initialiser un input type="file"

Initialiser un input type="file" [HTML] - HTML/CSS - Programmation

Marsh Posté le 27-04-2004 à 14:38:16    

 est-il possible d'initaliser une zone de texte de type "file" avec le nom d'un fichier. En l'occurence ici, il s'agit de modifier une image correspondante à une fiche.
 
  voici mon code qui ne fonctionne pô...  
 

Code :
  1. <input value="blabla<? echo $tab_prestation[0]['pres_icon']; ?>" name="monfichier[]" type="file" id="icon">


 
marci  :??:

Reply

Marsh Posté le 27-04-2004 à 14:38:16   

Reply

Marsh Posté le 27-04-2004 à 14:46:40    

non

Reply

Marsh Posté le 27-04-2004 à 14:51:08    


 
Et donc, y'a-t-il une solution ?

Reply

Marsh Posté le 27-04-2004 à 14:51:42    

Que l'user choisisse le bon fichier lui-même.

Reply

Marsh Posté le 27-04-2004 à 14:56:11    

Freekill a écrit :

Que l'user choisisse le bon fichier lui-même.


 
C'est pour afficher le nom du fichiers correspondant à l'image d'un user avec possibilité de la changer c tout...

Reply

Marsh Posté le 27-04-2004 à 15:14:04    

Citation :

Internet Explorer and Netscape do not use the VALUE attribute as the default contents of the input area. Any default value set via HTML is not usable via scripting and the DOM as well (hence it is not listed as 'supported' in any of the browsers.) If a user enters text in the field however, that value is then reachable via the DOM as it normally would be for a normal INPUT field (via the .value property.) The reason for this behavior would presumably be to ensure the security/safety of users against malicious authors.


 
http://www.blooberry.com/indexdot/ [...] utfile.htm

Reply

Marsh Posté le 27-04-2004 à 15:26:17    

Freekill a écrit :

Citation :

Internet Explorer and Netscape do not use the VALUE attribute as the default contents of the input area. Any default value set via HTML is not usable via scripting and the DOM as well (hence it is not listed as 'supported' in any of the browsers.) If a user enters text in the field however, that value is then reachable via the DOM as it normally would be for a normal INPUT field (via the .value property.) The reason for this behavior would presumably be to ensure the security/safety of users against malicious authors.


 
http://www.blooberry.com/indexdot/ [...] utfile.htm


 
Merci ! T vraiment trop fort, Kikill ! ! ! :jap: :D :lol:

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed