Pb de d'affichage de script

cpsifrance69100 Messages postés 6 Date d'inscription vendredi 22 avril 2005 Statut Membre Dernière intervention 30 avril 2005 - 22 avril 2005 à 03:14
cpsifrance69100 Messages postés 6 Date d'inscription vendredi 22 avril 2005 Statut Membre Dernière intervention 30 avril 2005 - 22 avril 2005 à 23:40
bonjour



si kel k1 peux m'expliqué pkoi le dernier script (votre windows) ne s'affiche pas sur mon site



page web http://cpsi.france.free.fr/nouvellepage2.htm



le script est bien dans la source


<script language="VBScript">
Function WinOS(theOS)
Dim Navigateur
Dim i
Set Navigateur=window.navigator
Agt = Navigateur.userAgent
If InStr(Agt, "Win 9x" ) = 0 and InStr(Agt, "Windows 98") Then
If theOS = 1 then
WinOS="W98"
Else
WinOS="Votre Windows est 98"
End If
ElseIf InStr(Agt, "Windows NT 5.0") Then
If theOS = 1 then
WinOS="W2K"
Else
WinOS="Votre Windows est 2000"
End If
ElseIf InStr(Agt, "Windows NT 5.") = 0 and InStr(Agt, "Windows NT" ) Then
If theOS = 1 then
WinOS="WNT"
Else
WinOS="Votre Windows est NT"
End If
ElseIf InStr(Agt, "Windows 98" ) <> 0 and InStr(Agt, "Win 9x") Then
If theOS=1 then
WinOS="WME"
Else
WinOS="Votre Windows est ME"
End If
ElseIf InStr(Agt, "Windows NT 5.1" ) <> 0 Then
If theOS = 1 then
WinOS="WXP"
Else
WinOS="Votre Windows est XP"
End If
End If
End Function


</script>
<script language="VBScript">
Dim theWinOS
theWinOS = WinOS(2)
Document.Write theWinOS
</script>






Merci

4 réponses

cs_roro06 Messages postés 732 Date d'inscription jeudi 2 janvier 2003 Statut Membre Dernière intervention 29 octobre 2007
22 avril 2005 à 10:24
Bonjour

Chez moi, il s'affiche ... sous Internet explorer, le seul à reconnaître le langage vbscript.

Cordialement
Roro webDev
0
cpsifrance69100 Messages postés 6 Date d'inscription vendredi 22 avril 2005 Statut Membre Dernière intervention 30 avril 2005
22 avril 2005 à 13:17
oui tu a raison c'est firefox qui le voit pas



alors si quelqu'un c'est comment faire merci d'avance
0
cs_roro06 Messages postés 732 Date d'inscription jeudi 2 janvier 2003 Statut Membre Dernière intervention 29 octobre 2007
22 avril 2005 à 14:45
Bonjour

Utiliser javascript



Autre chose :

au lieu de :


if((screen.width==800)&&(screen.height==600))
{document.write("Votre resolution écran est de 800 x 600");}

if((screen.width==1024)&&(screen.height==768))
{document.write("Votre resolution écran est de 1024 x 768");}

if((screen.width==1152)&&(screen.height==864))
{document.write("Votre resolution écran est de 1152 x 864");}

if((screen.width==1280)&&(screen.height==960))
{document.write("Votre resolution écran est de 1280 x 960");}

if((screen.width==1280)&&(screen.height==1024))
{document.write("Votre resolution écran est de 1280 x 1024");}

if((screen.width==1600)&&(screen.height==1024))
{document.write("Votre resolution écran est de 1600 x 1024");}

if((screen.width==1600)&&(screen.height==1200))
{document.write("Votre resolution écran est de 1600 x 1200");}


pourquoi tu ne mets pas tout simplement :

document.write("Votre résolution écran est de " + screen.width + " x " + screen.height); ?


Cordialement
Roro webDev
0
cpsifrance69100 Messages postés 6 Date d'inscription vendredi 22 avril 2005 Statut Membre Dernière intervention 30 avril 2005
22 avril 2005 à 23:40
Bonjour



Le Pb c'est que je ne sais pas programmé je fait de la recopi alors si
tu pouvais m'aidé parce que je fait des lignes et des lignes pour rien



Merci
0
Rejoignez-nous