View Single Post
  #1 (permalink)  
Old Nov 18th, 2007, 00:15
tlo5 tlo5 is offline
New Member
Join Date: Oct 2007
Location: US
Age: 28
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Columns and Rows

Hi,

I try to make a table with at least 3Columns* 3 Rows.
the table is when I upload the picture, the first picture would go to
first column/ first row...
Second pictures would go second column/first row
Third one go third column/first row...
Fourth would go first column/second row...so so on..
I got the code here..
HTML: Select all
var Urls = new Array();
var Imgs = new Array();

function showTags(theTag,thePlace) {

  function getTag(tag) { 
    var tmp='';
    xx=x[i].getElementsByTagName(tag);     
    try { tmp=xx[0].firstChild.data; } 
    catch(er) { tmp=''; }    
    return(tmp); 
  }

  var xx; var x; var txt;
  x = xmlDoc.getElementsByTagName(theTag);
  txt='<table border="0" cellPadding="2" width="210">'; 

  for (i=0; i<x.length; i++) { 
    Urls[i]=getTag("location"); Imgs[i]=getTag("image");  //getTag("title"); getTag("creator"); getTag("info");

    txt+='<tr><td><table width="295" onclick="play('+i+')" class="playlistlo" onmouseover="this.className = \'playlisthi\';" onmouseout="this.className = \'playlistlo\';"><tr>';
    txt+='<td><img src="'+getTag("image")+'" width="90" height="90" border="1" alt="Click to Play"></td><td width="200" valign=top>';
    txt+='<p><br>&nbsp;<b>'+getTag("title")+'</b><br>';
    txt+='&nbsp;by: '+getTag("creator")+'<br>';
    txt+='&nbsp;<a href="'+getTag("info")+'" target="_blank">Download it!</a></p>';
    txt+='</td></tr></table></td></tr>';
  }
  txt+="</table>";

  document.getElementById(thePlace).innerHTML=txt; 
}
It just go One column now..how can I modify to to want I want..
Thanks!

Last edited by c010depunkk; Nov 18th, 2007 at 02:05. Reason: please use [HTML] tags when posting HTML
Reply With Quote