Op deze website gebruiken we cookies om content en advertenties te personaliseren, om functies voor social media te bieden en om ons websiteverkeer te analyseren. Ook delen we informatie over uw gebruik van onze site met onze partners voor social media, adverteren en analyse. Deze partners kunnen deze gegevens combineren met andere informatie die u aan ze heeft verstrekt of die ze hebben verzameld op basis van uw gebruik van hun services. Meer informatie.

Akkoord

Vraag & Antwoord

Webprogrammeren & scripting

Javascript probleem

Hi all, Ik van van t net 2 verschillende dingen gehaald en die wil ik beide gebruiken op mijn site. Ten eerste dhtml menu (sothink) en Beehive (aanrader van Heidi forum webdesign). Na enig gepruts heb ik het menu en de layerapplicatie in 1 site maar de scrollbar van Beehive wordt niet weergegeven. Er is een incompatibiliteit tussen de twee script. Volgens mij komt dat door dat er 2 bestanden worden gebruikt (of twee locaties (temp?) voor de sripts.....althans dat is mn intuitie en aangezien ik verder geen verstand heb van java etc vraag ik jullie hulp. (als ik de vetgedrukte regel verwijder verschijnt scrollbar wel maar werkt t menu niet, althans ik zie het wel maar klapt niet open enzo) Zie onder: [code:1:e613786e0c] <html> <head> <title> BeeHive - DHTML library Demo </title> <script language="javascript" src="src/beehive.js"></script> <script language="javascript" src="src/dynscrollbar.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript" language="JavaScript"> <!-- var st_path=""; var st_lib="stm31.js"; document.open(); [b]document.write("<"+"script type='text/javascript' language='JavaScript' src='"+st_path+st_lib+"'><"+"/script>");[/b] document.close(); //--> </script> <style type="text/css"> #container {position:absolute; width:320; height:240; left:259; top:212; clip:rect(0,320,240,0); overflow:hidden; background-color:white;} #content {position:absolute; left:10; top:0; width:310;} #container2 {position:absolute; width:320; height:140; left:80; top:300; clip:rect(0,320,140,0); overflow:hidden; background-color:white;} #content2 {position:absolute; left:10; top:0; width:310;} #content3 {position:absolute; left:10; top:0; width:310; visibility:hidden;} div {font-family:tahoma; font-size:12px;} </style> <script language="javascript"> // if you use these examples as a tempate for your own pages you // do not need to leave the comments in these examples intact. Only // the .js files itself should remain unchanged. var barOne, barTwo; // layout vars, defined in scrollbar.js, overwrite here. scrollerBG = "images/scrollbg.gif"; // scrollbar background upSRC = "images/scrollup.gif"; // scroll up arrow downSRC = "images/scrolldn.gif"; // scroll down arrow scrollSRC = "images/scrollelm.gif"; // draggable scroll element scrollerHeight = 50; // height of draggable scroll element leftOffset = 7; // distance the content layer is from the clipped container, usually 0; extraSpace = 20; // extra space at the bottom, can be used if the scrollbar's height does // not correspond with the clipped height. function init() { // init() is called onload automatically // new scrollbar(x,y,w,h, nest) // you can nest the scrollbar in another layer by passing that // layer's ID as 5th parameter. (ideal for draggable windows etc) barOne = new scrollbar(240,50,16,125); // Assign a layer to be scrolled by the scrollbar. height // and everything else is automatically calculated. // scrollbar.setLayer('layerID'); barOne.setLayer('content'); // make as many as you like :) // barTwo.setLayer('content3'); would set the hidden layer // 'content3' as the current layer for scrollbar two. // technically you can assign any content layer to any // scrollbar in you page, but it is best to assign content // layers only to their intended scrollbar } </script> <script language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </script> </head> <body bgcolor="#FFFFFF" background="101stripe2gray1.gif"> <div id="container" style=""> <div id="content" style="background-color: #FFFFFF; left: 4px; top: 28px; visibility: visible"> <b>content</b><br> Look in the source of this file, there's comment inside. <br> <br> This is just test content, don't read it. Music is what makes the world go round. Now turn of your computer and go outside. This is just test content, don't read it.<br> </div> <div align="left"></div> </div> <div id="Layer1" style="position:absolute; left:200px; top:3px; width:599px; height:127px; z-index:1"> <div align="center"><img src="top_cordless_stadrdam.JPG" width="600" height="140"></div> </div> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p>  </p> <p> </p> <p> <!--Begin Sothink DHTMLMenu Body--> <script type="text/javascript" language="JavaScript"> <!-- geknipt //--> </script> <!--End Sothink DHTMLMenu Body--> </p> </body> </html>[/code:1:e613786e0c] [b:e613786e0c][mod-edit][/b:e613786e0c] 1) Gebruik de [code] tags voor lappen code. 2) Het is Javascript, Java is iets fundamenteels anders. [b:e613786e0c][/mod-edit][/b:e613786e0c]

kristallix