Web Analytics Made Easy -
StatCounter href becoming mis-aligned - CodingForum

Announcement

Collapse
No announcement yet.

href becoming mis-aligned

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

  • href becoming mis-aligned

    Hello -

    In the code below I am displaying some data. The first column in each row displays an ID that when clicked calls a function based on that ID. This all works fine until I sort the table. It seems as if the <a href. . .> is staying in it's originally specified cell, while the text it is linked to is being sorted. Can't seem to figure it out. Seems it should work as it is.

    Code:
    function showData(rID)
    {
    var supInfo=new Array();
    	for(d=0;d<repList.length;d++)
    	{
    		getMe('supID').value=repList[d];
    		repMonthly();
    		supInfo[d]=repInfo;
    	}
    	str3='<table id="table2">'+
    			'<thead>'+
    				'<th>ID</th>'+
    				'<th>Name</th>'+
    				'<th>Occurences</th>'+
    				'<th>Overage</th>'+
    				'<th>Supervisor</th>'+
    			'</thead>';
    	
    	for(s=0;s<supInfo.length;s++)
    	{
    		str3+='<tr>'+
    				'<td><a href="#" onclick="repDailyMonthly('+supInfo[s][0]+');">'+
                                     supInfo[s][0]+'</a></td>'+
    				'<td>'+supInfo[s][1]+'</td>'+
    				'<td>'+supInfo[s][4]+'</td>'+
    				'<td>'+supInfo[s][5]+'</td>'+
    				'<td>'+supInfo[s][3]+'</td>'+
    			'</tr>'
    	}
    	getMe('supID').value=rID;
    	info.innerHTML=str3;
    	initTable('table2');	
    }
    Thanks for the look,
    Basscyst
    Helping to build a bigger box. - Adam Matthews

  • #2
    Maybe it would help if I included the sort table script.
    Please See Attached
    Attached Files
    Last edited by Basscyst; Jan 29, 2005, 07:13 PM.
    Helping to build a bigger box. - Adam Matthews

    Comment

    Working...
    X