Bonjour amis programmeurs,
je suis actuellement en stage en allemagne dans le cadre de ma formation (BTS IRIS) et on me demande de faire une petite chose :

Tout d'abord d'utiliser Joomla pour faire une page web dynamique,
ensuite à l'aide d'un clic sur une image d'ouvrir automatiquement un logiciel
(word, excel,... selon le type de fichier à lire) et d'y ouvrir le fichier joint à l'article.

J'ai donc un petit scipt VBS pour cela :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
<script language=VBScript>
<!--
function load_word(mode, pfad)
	'mode 0 = normal open
	'mode 1 = open as dot
	Set appWord = CreateObject("Word.Application")
	' Display the application.
	appWord.Visible = TRUE
 
	'Open the document.
	'mode 1 = dot file 0 = docfile
	if mode = 1 then appWord.Documents.Add (pfad) end if
	if mode = 0 then appWord.Documents.Open (pfad) end if
	' Close the object variable.
	Set appWord = Nothing
end function
 
function load_excel(pfad)
	Set appExcel = CreateObject("Excel.Application")
	' Display the application.
	appExcel.Visible = TRUE
 
	'Open the document.
	appExcel.Workbooks.Open (pfad)
	' Close the object variable.
	Set appExcel = Nothing
end function
 
function load_powerpoint (pfad)	
	Set appPowerpoint = CreateObject("Powerpoint.Application")
	' Display the application.
	appPowerpoint.Visible = TRUE
 
	'Open the document.
	appPowerpoint.presentations.Open (pfad)
	' Close the object variable.
	Set appPowerpoint = Nothing
end function
 
-->
</script>
 
<input type=image onClick="load_word '0', 'http://sites.univ-provence.fr/riup/images/stories/PDF/contrat_etudes.doc' " src="http://ci-muenster.de/__we_thumbs__/1650_2_cd4.jpg"></input>
Ce script fonctionne très bien lorsque je l'ouvre avec Notepad++, mais avec Joomla, étrangement, ca ne fonctionne plus, mon image est bien présente mais lorsque je clic dessus word ne s'ouvre pas, contrqirement à mes tests avec notepad++.

Cela fait maintenant plusieurs heures que je me prends la tête dessus en vain.

J'espère que vous pourrez m'aider...

Merci d'avance.