By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

Re: Moving dynamically created table rows up and down in an HTMLtable

P: n/a
On 2008-10-10 19:56, T.G. wrote:
After loading the snippet in your browser, you will see a simple HTML
table with 2 hyperlinks per line that call js code to move the rows
up and down. There is a hyperlink at the bottom, 'ADD', that
dynamically adds 3 rows to the bottom of the table. These new rows
also have Up and Down links that move the rows up and down.

The problem: the links in the 5 static rows work perfectly. The links
in the new rows only work the first time they are clicked on, then
cease to fire!
This doesn't work at all, at least not in Firefox. When any of the "up"
or "down" links is clicked, the following error occurs:

clickedRow.removeNode is not a function

in line #34: clickedRow.removeNode(true);
Did you mean "removeChild"?
I cannot figure out why. I wonder if one of you could point me in the
right direction,
The very first thing you should do validate your HTML, and fix all of
the errors:

http://validator.w3.org/

Then use a script debugging tool in whatever browser you're using. I
suggest you use Firefox, and install the "Firebug" add-on. Fixing your
script shouldn't be too hard then.
- Conrad
Oct 10 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sorry, I neglected to inform the group that its and IE only app and this
does work in IE ... but I will have a boo at the link!
"Conrad Lender" <cr******@yahoo.comwrote in message
news:wr******************************@supernews.co m...
On 2008-10-10 19:56, T.G. wrote:
>After loading the snippet in your browser, you will see a simple HTML
table with 2 hyperlinks per line that call js code to move the rows
up and down. There is a hyperlink at the bottom, 'ADD', that
dynamically adds 3 rows to the bottom of the table. These new rows
also have Up and Down links that move the rows up and down.

The problem: the links in the 5 static rows work perfectly. The links
in the new rows only work the first time they are clicked on, then
cease to fire!

This doesn't work at all, at least not in Firefox. When any of the "up"
or "down" links is clicked, the following error occurs:

clickedRow.removeNode is not a function

in line #34: clickedRow.removeNode(true);
Did you mean "removeChild"?
>I cannot figure out why. I wonder if one of you could point me in the
right direction,

The very first thing you should do validate your HTML, and fix all of
the errors:

http://validator.w3.org/

Then use a script debugging tool in whatever browser you're using. I
suggest you use Firefox, and install the "Firebug" add-on. Fixing your
script shouldn't be too hard then.
- Conrad

Oct 14 '08 #2

P: n/a
Here is the problem in better detail, it seems I'd best be looking for a
workaround:

http://javascript-today.blogspot.com...e-problem.html

Thanks anyway!
Tim

"T.G." <ye*************@gmail.comwrote in message
news:gd**********@registered.motzarella.org...
Sorry, I neglected to inform the group that its and IE only app and this
does work in IE ... but I will have a boo at the link!
"Conrad Lender" <cr******@yahoo.comwrote in message
news:wr******************************@supernews.co m...
>On 2008-10-10 19:56, T.G. wrote:
>>After loading the snippet in your browser, you will see a simple HTML
table with 2 hyperlinks per line that call js code to move the rows
up and down. There is a hyperlink at the bottom, 'ADD', that
dynamically adds 3 rows to the bottom of the table. These new rows
also have Up and Down links that move the rows up and down.

The problem: the links in the 5 static rows work perfectly. The links
in the new rows only work the first time they are clicked on, then
cease to fire!

This doesn't work at all, at least not in Firefox. When any of the "up"
or "down" links is clicked, the following error occurs:

clickedRow.removeNode is not a function

in line #34: clickedRow.removeNode(true);
Did you mean "removeChild"?
>>I cannot figure out why. I wonder if one of you could point me in the
right direction,

The very first thing you should do validate your HTML, and fix all of
the errors:

http://validator.w3.org/

Then use a script debugging tool in whatever browser you're using. I
suggest you use Firefox, and install the "Firebug" add-on. Fixing your
script shouldn't be too hard then.
- Conrad


Oct 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.