I've searched the archives and couldn't find anything discussing my problem.  The following (dynamic data created server side) works and displays fine in IE and NS6.  In NS4 the data is correct but the inline CSS doesn't work for the 2 curPage layers nor for the various course[] array layers EXCEPT the last one!  This holds true no matter what value I set for perPage, it's always the last layer that the CSS works in but not the others.  Any ideas?
 
(sorry for the length)
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
 
<script language="Javascript" src="javascript:void(0);"></script>
<script language="Javascript">
 
 DynAPI.setLibraryPath('src/lib/')
 
 DynAPI.include('dynapi.api.browser.js')
 DynAPI.include('dynapi.api.dynlayer.js')
 DynAPI.include('dynapi.api.dyndocument.js')
 
 var courseData= new Array(120);
 var numCourses= 120;
 var numPages= 10;
 var perPage= 12;
 var nav;
 var nav2;
 var bottom;
 var course= new Array(12);
 var curPage;
 var curPage2;
 

courseData[1] = '<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align: center; text-transform: uppercase"> <a href="/home-course-detail.php?courseID=533" style="color: #333333">Electrical Diagnostic (Basic) Training</a></div><div style="color: #2F4F4F; font-family: Arial; font-size: 12px; background-color: #F0F0C0"> <span style="font-weight: bold">Provided By: </span> DC-Electrical<br> <span style="font-weight: bold">Instructor: </span> Kit Wickenkamp (The Wizard)<br> <span style="font-weight: bold">Date: </span> 22 Apr 2002<br> <span style="font-weight: bold">Registration Deadline: </span> 17 Apr 2002<br> <span style="font-weight: bold">City: </span> Kennewick, WA <p style="font-size: 13px">AUTOMOTIVE ELECTRICAL SYSTEMS (BASIC) TRAINING<br /> 2 Day Class (16 Hrs)<br /><br /> 1.  ELECTRICAL FUNDAMENTALS<br />         A.  Basic D/C Electrical Theory<br />         B.  Current Flow<br />         C.  Ohm\'s Law - The Relationship Factor<br />         D.  Conducters &amp; Insulators<br />         E.  Electricity &amp; Magnetism<br /> 2.  ELECTRICAL DEVICES/COMPONENTS<br />         A.  Batteries<br />         B.  Cables/Wiring<br />         C.  Generators (Alternators)<br />         D.  Starters<br />         E.  Protection Devices<br />         F.  Switches, Relays, Controls<br /> 3.  TESTING CIRCUITS/COMPONENTS<br />         A.  Basic Tools/Equipment<br />         B.  Multimeters<br />         C.  Scopes<br />         D.  Special Tools<br /> 4.  USING WIRING DIAGRAMS<br />         A.  Reading Wiring Diagrams<br />         B.  Understanding Current Flow<br />         C.  Understanding Circuit Design<br />         D.  Locating Problems</p></div>';
 
courseData[2] = '<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align: center; text-transform: uppercase"> <a href="/home-course-detail.php?courseID=559" style="color: #333333">Powerstroke Diesel</a></div><div style="color: #2F4F4F; font-family: Arial; font-size: 12px; background-color: #F0F0C0"> <span style="font-weight: bold">Provided By: </span> Turbo Training/ AST Training<br> <span style="font-weight: bold">Instructor: </span> Bruce Amacker<br> <span style="font-weight: bold">Date: </span> 22 Apr 2002<br> <span style="font-weight: bold">Registration Deadline: </span> 17 Apr 2002<br> <span style="font-weight: bold">City: </span> Middleburg Hts, OH <p style="font-size: 13px">April 22 - Ford Powerstroke Diesel Part 1<br />Covers all operating systems- glow plug circuits, fuel supply and delivery, complete HEUI theory and application, oil pump low pressure and high pressure circuits, all plumbing circuits involved for both systems, computer and injector driver module systems, diagnostic procedures, computer strategies, injector sleeve replacements, common problems and pattern failures. &nbsp;A complete Powerstroke engine will be torn down in the classroom to examine fuel delivery!  A wide variety of Powerstroke parts are provided for demonstration purposes- cylinder head, turbocharger, fuel injectors, sensors, pumps, a complete fuel system, flywheels, and more. A Powerstroke cylinder head which has been cut in half to expose all passageways is also used in class.  Presented by Master Instructor Bruce Amacker of TurboTraining. Class materials will be provided.  Class time 6:30-9:45PM, cost $185.00 covers both nights, April 22 and 24. Course Number PSD1.<br /><br /><br /><br />April 24- Ford Powerstroke Diesel Part 2<br />Night 2 expands on diagnostics with most of the evening spent in the shop doing live tests on running Powerstroke equipped trucks with the scan tool of choice, installing pressure gauges, a breakout box, and using a lab scope to evaluate sensor waveforms.  Cost $185 covers both nights.<br />Class held at AST Training in Middleburg Hts, Ohio  Call 440-572-0658 or 440-243-0503 to register.</p></div>';
 
 
<!-- continued setting of courseData array, 120 elements total, omitted for brevity -->
 
 function setPage(page)
 {
  startCourse=(page-1)*perPage+1;
  startTop=80;
  for (i=1;i<=perPage;i++)
  {
   if (startCourse<=numCourses)
   {
    course[i].setVisible(false);
    course[i].setHTML(courseData[startCourse]);
    height=course[i].getContentHeight();
    course[i].moveTo(50,startTop);
    course[i].setSize(570,height);
    course[i].setVisible(true);
    startTop=startTop + height;
    startCourse++;
   }
   else
   {
    course[i].setSize(0,0);
    course[i].moveTo(50,startTop);
    course[i].setHTML('');
    course[i].setVisible(false);
   }
   
   startTop+=15;
   curPage2.setHTML('<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align:  center;">Page ' + page + ' of ' + numPages + '</div>');
   curPage2.moveTo(50,startTop);
   startTop+=25;
 
   nav2.moveTo(50,startTop);
   startTop+=20;
 
   curPage.setHTML('<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align:  center;">Page ' + page + ' of ' + numPages + '</div>');
   if (is.ns4) document.height=startTop+20;
   window.scrollTo(0,0);
  }
 }
 

</script>
 
<script language="Javascript">
 
DynAPI.
{
 course[1] = new DynLayer();
 course[1].moveTo(50,0);
 course[1].setSize(570,0);
 course[1].setVisible(false);
 course[1].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[1]);

 course[2] = new DynLayer();
 course[2].moveTo(50,0);
 course[2].setSize(570,0);
 course[2].setVisible(false);
 course[2].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[2]);
 course[3] = new DynLayer();
 course[3].moveTo(50,0);
 course[3].setSize(570,0);
 course[3].setVisible(false);
 course[3].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[3]);
 course[4] = new DynLayer();
 course[4].moveTo(50,0);
 course[4].setSize(570,0);
 course[4].setVisible(false);
 course[4].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[4]);
 course[5] = new DynLayer();
 course[5].moveTo(50,0);
 course[5].setSize(570,0);
 course[5].setVisible(false);
 course[5].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[5]);
 course[6] = new DynLayer();
 course[6].moveTo(50,0);
 course[6].setSize(570,0);
 course[6].setVisible(false);
 course[6].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[6]);
 course[7] = new DynLayer();
 course[7].moveTo(50,0);
 course[7].setSize(570,0);
 course[7].setVisible(false);
 course[7].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[7]);
 course[8] = new DynLayer();
 course[8].moveTo(50,0);
 course[8].setSize(570,0);
 course[8].setVisible(false);
 course[8].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[8]);
 course[9] = new DynLayer();
 course[9].moveTo(50,0);
 course[9].setSize(570,0);
 course[9].setVisible(false);
 course[9].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[9]);
 course[10] = new DynLayer();
 course[10].moveTo(50,0);
 course[10].setSize(570,0);
 course[10].setVisible(false);
 course[10].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[10]);
 course[11] = new DynLayer();
 course[11].moveTo(50,0);
 course[11].setSize(570,0);
 course[11].setVisible(false);
 course[11].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[11]);
 course[12] = new DynLayer();
 course[12].moveTo(50,0);
 course[12].setSize(570,0);
 course[12].setVisible(false);
 course[12].setBgColor('#F0F0C0');
 DynAPI.document.addChild(course[12]);
 nav = new DynLayer();
 nav.moveTo(50,10);
 nav.setSize(570,20);
 nav.setBgColor('#C0D0A0');
 nav.setVisible(true);
 nav.setHTML('<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align:  center;"><a href="javascript:setPage(1)">1</a>&nbsp; <a href="javascript:setPage(2)">2</a>&nbsp; <a href="javascript:setPage(3)">3</a>&nbsp; <a href="javascript:setPage(4)">4</a>&nbsp; <a href="javascript:setPage(5)">5</a>&nbsp; <a href="javascript:setPage(6)">6</a>&nbsp; <a href="javascript:setPage(7)">7</a>&nbsp; <a href="javascript:setPage(8)">8</a>&nbsp; <a href="javascript:setPage(9)">9</a>&nbsp; <a href="javascript:setPage(10)">10</a>&nbsp; </div>');
 DynAPI.document.addChild(nav);
 
 curPage = new DynLayer();
 curPage.moveTo(50,35);
 curPage.setSize(570,20);
 curPage.setBgColor('#C0D0A0');
 curPage.setVisible(true);
 DynAPI.document.addChild(curPage);
 
 nav2 = new DynLayer();
 nav2.moveTo(50,10);
 nav2.setSize(570,20);
 nav2.setBgColor('#C0D0A0');
 nav2.setVisible(true);
 nav2.setHTML('<div style="font-family: Arial; font-size: 14px; font-weight: bold; background-color: #C0D0A0; text-align:  center;"><a href="javascript:setPage(1)">1</a>&nbsp; <a href="javascript:setPage(2)">2</a>&nbsp; <a href="javascript:setPage(3)">3</a>&nbsp; <a href="javascript:setPage(4)">4</a>&nbsp; <a href="javascript:setPage(5)">5</a>&nbsp; <a href="javascript:setPage(6)">6</a>&nbsp; <a href="javascript:setPage(7)">7</a>&nbsp; <a href="javascript:setPage(8)">8</a>&nbsp; <a href="javascript:setPage(9)">9</a>&nbsp; <a href="javascript:setPage(10)">10</a>&nbsp; </div>');
 DynAPI.document.addChild(nav2);
 
 curPage2 = new DynLayer();
 curPage2.moveTo(50,35);
 curPage2.setSize(570,20);
 curPage2.setBgColor('#C0D0A0');
 curPage2.setVisible(true);
 DynAPI.document.addChild(curPage2);
 
 setPage(1);
}
 
</script>
</head>
<body>
</body>
</html>
 
I

Reply via email to