0 Replies Latest reply on Sep 18, 2007 9:03 AM by amy3000

    Validation errors javascript navigation bar

    amy3000
      I created a navigation bar using Dreamweaver CS3 wizard. I got several error messages. After I replaced all the uppercase letters with lower case, I had only one error message. I know nothing about javascript and I may have messed something up. Dreamweaver put the navigation bar in a table. I got rid of the table and put it in div tags. I also moved the part that goes in the head to an external sheet. Here is coding from the page:

      quote:

      <div id="mainNav">

      <div class="buttons"> <a href="#" target="_top" onClick="MM_nbGroup('down','group1','home','images/buttons/home2.jpg',1)" onMouseOver="MM_nbGroup('over','home','images/buttons/home2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="home" src="images/buttons/home2.jpg" border="0" alt="" onLoad="MM_nbGroup('init','group1','home','images/buttons/home1.jpg',1)" /></a> </div>

      <div class="buttons"> <a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','About','images/buttons/about2.jpg',1)" onMouseOver="MM_nbGroup('over','About','images/buttons/about2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="About" src="images/buttons/about1.jpg" border="0" alt="" onLoad="" /></a></div>

      <div class="buttons"> <a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','support','images/buttons/support2.jpg',1)" onMouseOver="MM_nbGroup('over','support','images/buttons/support2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="support" src="images/buttons/support1.jpg" border="0" alt="#" onLoad="" /></a> </div>

      <div class="buttons"> <a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','contact','images/buttons/contaqct2.jpg',1)" onMouseOver="MM_nbGroup('over','contact','images/buttons/contaqct2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="contact" src="images/buttons/contact1.jpg" border="0" alt="" onLoad="" /></a></div>

      </div>
      <!--mainNav-->


      And the error messages:
      quote:


      Line 33, Column 302: there is no attribute "onload".
      …/home2.jpg" border="0" alt="" onload="MM_nbGroup('init','group1','home','imag
      /Q]

      If I may throw another javascript question in.... Dreamweaver threw something into the body tag that appears to be preloading the images

      "<body onload="MM_preloadImages('images/buttons/about2.jpg','images/buttons/support2.jpg','image s/buttons/contaqct2.jpg','../images/buttons/home1.jpg','../images/buttons/home2.jpg')">"

      Can this be moved to the external sheet or is this the same thing which is in the external sheet:

      "function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a .indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
      }"

      Thanks.