FORUM Tom's Hardware » Programmation » HTML / Javascript » Ouvrir un fichier provenant d'un listbox en html
 

Ouvrir un fichier provenant d'un listbox en html

Il y a 369 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici
Ajouter une réponse



 Mot :   Pseudo :  
 
Bas de page
Auteur
 Sujet : Ouvrir un fichier provenant d'un listbox en html
 
Plus d'informations

Je veux pouvoir ouvrir plusieurs fichiers Excel par une page HTML.
Ces fichiers se retrouves dans le dossier C:\GOKISS\
Les fichiers sont: test1.xls, test2.xls, test3.xls, test4.xls, test5.xls
Par une liste déroulante (listbox) en html, je veux ouvrir le fichier correspondant à la sélection.
J'ai essayé plusieurs autres ébauches avec propriété ONCHANGE,..... mais sans résultat.
 
Voici mon ébauche de code HTML.
On dirait que la deuxième ligne de code est en problème dans mes 2 ébauches.
 
 
<FORM NAME="Menu"><DIV>
<SELECT NAME="SelectURL" onfiltered="document.location.href=document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value">
<OPTION VALUE="../../../GOKISS/test1.xls"SELECTED>Control1
<OPTION VALUE="../../../GOKISS/test2.xls">Control2
<OPTION VALUE="../../../GOKISS/test3.xls">Control3
<OPTION VALUE="../../../GOKISS/test4.xls">Control4
<OPTION VALUE="../../../GOKISS/test5.xls">Control5
</SELECT><DIV>
</FORM>
 
 
 
Voici une autre ébauche:
<SELECT NAME="Menu"  onChange="window.open=this.value">
<OPTION VALUE="../../../GOKISS/test1.xls"SELECTED>Control1
<OPTION VALUE="../../../GOKISS/test2.xls">Control2
<OPTION VALUE="../../../GOKISS/test3.xls">Control3
<OPTION VALUE="../../../GOKISS/test4.xls">Control4
<OPTION VALUE="../../../GOKISS/test5.xls">Control5
</SELECT>
 
 
 
Pouvez-vous m'aider ?
 

zeb
Profil : Modérateur libre
Plus d'informations

Balise [code], stp.

Plus d'informations

personellement, j'aurai plutot penché pour du php derriere ton code ( mais bon , j'aime pas le javascrip aussi ^^ )

Profil : Pointeur
Plus d'informations

ca depend la portée du truc mais du js ca peux le faire
 

onchange="window.location=this.value;"


---------------
Da Bidz Triad©®™: Bidz Interceptor
.:: Smileyz version 4.2 [050625]::. -- Code source disponible sous licence GPL.
[u

Aller à :
Ajouter une réponse
  FORUM Tom's Hardware » Programmation » HTML / Javascript » Ouvrir un fichier provenant d'un listbox en html
 

Annonces Google
Publicité