I set up a text box and a text field to try to mimic what you are trying to do.
I was able to come up with this, somewhat rudimentary, concept below. I hope
that it might help you to debug.
var submitRow = function () {
var newmssg = document.getElementById('message').value;
if(newmssg..length) {
addRow(newmssg);
} else {
alert('No Text to Add');
}
}
var addRow = function (mssg) {
newRow = document.getElementById('testTable').insertRow(0);
newRow.id = 'newrow' +
document.getElementById('testTable').rows.length;
newCell = newRow.insertCell(0);
newCell.innerHTML = '<a href="javascript:remRow(\'' + newRow.id +
'\')">' + mssg + document.getElementById('testTable').rows.length + '</a>';
}
var remRow = function (rowid) {
var lastrow = document.getElementById('testTable').rows.length - 1;
for (x=0;x<=lastrow;x++) {
if(document.getElementById('testTable').rows[x].id == rowid) {
document.getElementById('testTable').deleteRow(x);
break;
}
}
}
----------
William E. Seiter
ColdFusion Programmer / Web Developer
Free Website Trade Publication >> Website Magazine
Be sure to answer all of the questions on the subscription form, small price to
pay for the loads of excellent content this magazine offers to Web
Professionals for FREE!!
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Use PassKey: GoldenGrove
You'll be glad you did.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309182
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4