Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2467 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  [HTML] Initialiser un input type="file"

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[HTML] Initialiser un input type="file"

n°709722
the_white_​rabbit
Follow the white rabbit !
Posté le 27-04-2004 à 14:38:16  profilanswer
 

 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  :??:

mood
Publicité
Posté le 27-04-2004 à 14:38:16  profilanswer
 

n°709727
Freekill
Electron libre…
Posté le 27-04-2004 à 14:46:40  profilanswer
 

non

n°709735
the_white_​rabbit
Follow the white rabbit !
Posté le 27-04-2004 à 14:51:08  profilanswer
 


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

n°709737
Freekill
Electron libre…
Posté le 27-04-2004 à 14:51:42  profilanswer
 

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

n°709744
the_white_​rabbit
Follow the white rabbit !
Posté le 27-04-2004 à 14:56:11  profilanswer
 

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...

n°709755
Freekill
Electron libre…
Posté le 27-04-2004 à 15:14:04  profilanswer
 

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

n°709776
the_white_​rabbit
Follow the white rabbit !
Posté le 27-04-2004 à 15:26:17  profilanswer
 

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:


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  [HTML] Initialiser un input type="file"

 

Sujets relatifs
transformer les caractères ayant un sens "spécial" en HTMLSaisie de texte en HTML
unexpected end of file...[HTML/JS] Cherche un script pour faire ce type de diaporama...
quel type de donnes utilise dans ce cas ?changement du type de données
[HTML] Petite aide requise pour mon TPE :)Problème de sélection avec VB pour calculer l'écart type
[html/css] espacement vertical ? 
Plus de sujets relatifs à : [HTML] Initialiser un input type="file"


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR