Toon posts:

Probleem met javascriptje

Pagina: 1
Acties:
  • 25 views sinds 30-01-2008

Verwijderd

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

  • Jaspertje
  • Registratie: September 2001
  • Laatst online: 12-08 16:04

Jaspertje

Max & Milo.. lief

erm wat werkt niet.. en wat doe je in /14 (Programming & Webscripting)

Je moet naar /13...

O en zet je code in [ code] [/ code]tags.... dat leest beter

[ Voor 66% gewijzigd door Jaspertje op 01-09-2003 14:33 ]


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Lees dit paragraafje eventjes.

Voordat je in W&G post ook deze even lezen. En gebruik [code] ... [/code] tags, ajb.

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 17-08 23:56

Janoz

Moderator Devschuur®

!litemod

Javascript hoort in webdesign & graphics.

PW -> WG

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Dit topic is gesloten.