Web Analytics Made Easy -
StatCounter odd HTML Generator. - CodingForum

Announcement

Collapse
No announcement yet.

odd HTML Generator.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • odd HTML Generator.

    Soz don't know what to label this really, anyway I got this class function.

    Code:
    this.MakeGallery=function()
    {
      switch(this.setup)
      {
        case 1:
        {
          id=0;
          document.writeln('<div style="position:relative;left:30px;width:500px;height:300px;background-color:#FF0000" id="gallery">');
          for(I=0;I<=2;I++)
          {
             for(J=0;J<=5;J++)
             { 				  
                document.writeln('<div style="position:absolute;top:'+(I*75+5)+'px;left:'+(J*60+5)+'px;width:55px;height:70px;border : 1px solid White;" id="'+id+'"></div>');
                id++;
             }	
          }
          document.writeln('</div>');	
          I=0;
          while(I<(6*3) && I<this.imageList.length)
          {
            var Div=document.getElementById(I);
            Div.innerHTML='<img src="'+this.imageList[I][0]+'">';
            I=I+1;
          }
        }
      }
    }
    Anyway that don't work gives me a null object when I reach the while loop.
    But when I put
    document.write('ANYTHING')
    in the outer for loop it does work, any suggestions as to why?
    Last edited by Garadon; Feb 6, 2004, 03:34 PM.
Working...
X