Ik heb een vraag betreffende een conflict tussen <body onload images> en een javascript doimenu.
Het betreft de site www.kopschoon.nl.
Het probleem is dat bij elke reload de index page een random image laadt. Het laden van een image kost tijd en dit vertraagt het doimenu.
Ik heb hiervoor de volgende oplossing gevonden:
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
Enig probleem is dat indien het doimenu wordt uitgevoerd VOOR de <body onload>, het doimenu niet meer werkt, maar de <body onload> wel. Deze dus:
<!-- doiMenu // -->
<script type="text/javascript" src="doimenu/js/doiMenuDOM.js"></script>
<script type="text/javascript" src="doimenu/js/functions.js"></script>
<!-- doiMenu // -->
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
Als het doimenu wordt uitgevoerd NA de <body onload>, werkt het doimenu prima, maar de <body onload> niet. Deze dus:
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
<!-- doiMenu // -->
<script type="text/javascript" src="doimenu/js/doiMenuDOM.js"></script>
<script type="text/javascript" src="doimenu/js/functions.js"></script>
<!-- doiMenu // -->
Ik heb ook al HVMENU (http://www.dynamicdrive.com/dynamicindex1/hvmenu/) geprobeerd, maar had hetzelfde probleem.
Een oplossing zou kunnen zijn, het doimenu laten werken in combinatie met <body onload>. Een andere oplossing zou kunnen zijn de dat het doimenu altijd eerder wordt ingeladen dan de image.
Het betreft de site www.kopschoon.nl.
Het probleem is dat bij elke reload de index page een random image laadt. Het laden van een image kost tijd en dit vertraagt het doimenu.
Ik heb hiervoor de volgende oplossing gevonden:
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
Enig probleem is dat indien het doimenu wordt uitgevoerd VOOR de <body onload>, het doimenu niet meer werkt, maar de <body onload> wel. Deze dus:
<!-- doiMenu // -->
<script type="text/javascript" src="doimenu/js/doiMenuDOM.js"></script>
<script type="text/javascript" src="doimenu/js/functions.js"></script>
<!-- doiMenu // -->
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
Als het doimenu wordt uitgevoerd NA de <body onload>, werkt het doimenu prima, maar de <body onload> niet. Deze dus:
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/titel001.jpg', 'images/titel002.jpg', 'images/titel003.jpg',
'images/titel004.jpg', 'images/titel005.jpg', 'images/titel006.jpg', 'images/titel007.jpg',
'images/titel008.jpg', 'images/titel009.jpg', 'images/titel010.jpg', 'images/titel011.jpg',
'images/titel012.jpg', 'images/titel013.jpg')">
<!-- doiMenu // -->
<script type="text/javascript" src="doimenu/js/doiMenuDOM.js"></script>
<script type="text/javascript" src="doimenu/js/functions.js"></script>
<!-- doiMenu // -->
Ik heb ook al HVMENU (http://www.dynamicdrive.com/dynamicindex1/hvmenu/) geprobeerd, maar had hetzelfde probleem.
Een oplossing zou kunnen zijn, het doimenu laten werken in combinatie met <body onload>. Een andere oplossing zou kunnen zijn de dat het doimenu altijd eerder wordt ingeladen dan de image.