Hoi, Ik heb problemen om het onderstaande script aan de praat te krijgen. Het is een script die zowel detecteert of een gebruiker flash heeft en in welke resolutie de gebruiker werkt. Het is een samenvoeging van twee andere scripts maar ik krijg hem niet werkend. Als iemand mij zou kunnen helpen graag. Ik roep de functie aan met <body onload="detect()">
Alvast bedankt.
<script language="JavaScript">
<!--
function detect()
{
if(navigator.appName == "Microsoft Internet Explorer" &&
(navigator.appVersion.indexOf("Mac") != -1 ||
navigator.appVersion.indexOf("3.1") != -1)){
noautoinstall = "true";
}
if (navigator.appName == "Microsoft Internet Explorer" && noautoinstall != "true")
{
if (screen.width=='800') {
document.location.href='index0800.htm'
} else if (screen.width=='1024') {
document.location.href='index1024.htm'
}
}
else if(navigator.plugins)
{
if(navigator.plugins["Shockwave Flash"] || navigator.plugins["Shockwave Flash 2.0"])
{
if (screen.width=='800') {
document.location.href='index0800.htm'
} else if (screen.width=='1024') {
document.location.href='index1024.htm'
}
}
else
{
if (screen.width=='800') {
document.location.href='index0800a.htm'
} else if (screen.width=='1024') {
document.location.href='index1024a.htm'
}
}
}
</script>
Alvast bedankt.
<script language="JavaScript">
<!--
function detect()
{
if(navigator.appName == "Microsoft Internet Explorer" &&
(navigator.appVersion.indexOf("Mac") != -1 ||
navigator.appVersion.indexOf("3.1") != -1)){
noautoinstall = "true";
}
if (navigator.appName == "Microsoft Internet Explorer" && noautoinstall != "true")
{
if (screen.width=='800') {
document.location.href='index0800.htm'
} else if (screen.width=='1024') {
document.location.href='index1024.htm'
}
}
else if(navigator.plugins)
{
if(navigator.plugins["Shockwave Flash"] || navigator.plugins["Shockwave Flash 2.0"])
{
if (screen.width=='800') {
document.location.href='index0800.htm'
} else if (screen.width=='1024') {
document.location.href='index1024.htm'
}
}
else
{
if (screen.width=='800') {
document.location.href='index0800a.htm'
} else if (screen.width=='1024') {
document.location.href='index1024a.htm'
}
}
}
</script>