dynamic A tag

wxdqz

New Member
hey all, i just created my first dynamic talbe and there are links in the table and i was wondering how do you create a dynamic anchor tag. in its smiliest form because i am a nebiew at javascript. heres my code for the table
function makeTable()
{
var links = new Array;

links[0] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/CenterTag.htm' id='Element'>Center</a>";
links[1] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/UnorderListTag.htm' id='Element'>Ul</a>";
links[2] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/OrderedListTag.htm' id='Element'>Ol</a>";
links[3] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/TableTag.htm' id='Element'>Table</a>";
links[4] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/FramesetTag.htm' id='Element'>Frameset</a>";
links[5] = "<a href='http://www.webdeveloper.com/forum/archive/index.php/ImageTag.htm' id='Element'>Img</a>";

var content = new Array;

content[0] = "Deprecated. Centers Content.";
content[1] = "Creats an unorded list. The list items appear as bullets.";
content[2] = "Creates an ordeld list. The list items appear a numbers.";
content[3] = "Defines a table.";
content[4] = "Creates frames.";
content[5] = "Displays an image.";

var oRow, oCell, i;
for (i = 0; i < links.length; i++)
{
oRow = ElementTable.insertRow();
oCell = oRow.insertCell();
oCell.colSpan = "2";
oCell.innerHTML = links;
oRow = ElementTable.insertRow();
oCell = oRow.insertCell();
oCell.width = "20";
oCell = oRow.insertCell();
oCell.innerText = content;
}
}
 
Back
Top