07-28-2004, 08:18 AM
Quote:with javascript:
myTable = document.getElementById("tableid");
newRow = myTable.insertRow();
newCell = newRow.insertCell();
newCell.innerHTML = "blahblahblah";
This isn't exactly the "fastest" method, but it's the best method if you're looking for compact code and/or easy-to-code code.
Oh wow... this definitely looks like the most elegant thing I've seen so far... I'll definitely experiment with this. Thanks.
I was looking at generating a bunch of DIVs from php and then show/hiding them with javascript. Would have been ugly as hell... and a very bloated file to be downloaded by anyone submitting something.
EDIT :: To anyone facing this, there's a perfect example here: here. The 'innertext' method doesn't work under FireFox, but if you change it to innerHTML, it DOES work. Thanks so much again, it always helps to know what keywords to search for.
--
EDIT 2 :: Removed link to a page I'm now working on.