how can i remove all rows from n tables in one form?

K

kie

url explaining what i' trying to do @
http://www.kieran.f2s.com/remove_all_rows_all_tables.htm

hi,

i want to create a function removing all rows from 3 tables. the
tables were created using the 'createElement' function, and can remove
rows one by one using a function attached to a button held within each
dynamic '<tr>'.

i'm not sure where to start on removing all rows in the table with one
button though, any advice would be greatly appreciated.

kie

p.s. the code for my example was too long, so i put a simple page at
http://www.kieran.f2s.com/remove_all_rows_all_tables.htm
showing what i'm trying to do.
 
D

DU

kie said:
url explaining what i' trying to do @
http://www.kieran.f2s.com/remove_all_rows_all_tables.htm

hi,

i want to create a function removing all rows from 3 tables. the
tables were created using the 'createElement' function, and can remove
rows one by one using a function attached to a button held within each
dynamic '<tr>'.

i'm not sure where to start on removing all rows in the table with one
button though, any advice would be greatly appreciated.

kie

p.s. the code for my example was too long, so i put a simple page at
http://www.kieran.f2s.com/remove_all_rows_all_tables.htm
showing what i'm trying to do.

Your code has many problems and issues which I honestly believe you
should address first. It's important to clarify, correct and simplify
your code first before going any further. Your code is already quite
long and complex: trying to fix first some basic issues will certainly
ease the process of finding a solution to your question along with
avoiding many future problems, headaches like crashes at runtime on the
user's system.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
K

kie

thanks, i'm looking through your web site now. especially the page
"Dynamic Table Formatting"
(http://www10.brinkster.com/doctorunclear/HTMLJavascriptCSS/DynamicTableFormatting.html),
is this the one you meant me to read to help me clean up the problems
in my code?

its a great bookmark to have, i'd like to eventually learn all the
techniques you've documented.

i firstly set out to make the page work in ie6, then start worrying
about cross browser compatibility, your web site is primarily
concerned with this. is my code still problematic and badly formatted
for ie6 only? even though it functions up to an extent?

harsh critisism will not be take offense, i'm still learning how to do
this.

thanks again, kie
 
D

DU

kie said:
thanks, i'm looking through your web site now. especially the page
"Dynamic Table Formatting"
(http://www10.brinkster.com/doctorunclear/HTMLJavascriptCSS/DynamicTableFormatting.html),
is this the one you meant me to read to help me clean up the problems
in my code?

No, not at all. This page has very little to do with the difficulties I
see in your code. In fact, that table formatting page is not well done
.... I refer to the visual display and its interactivity which requires a
high scr. res.
its a great bookmark to have, i'd like to eventually learn all the
techniques you've documented.

i firstly set out to make the page work in ie6, then start worrying
about cross browser compatibility, your web site is primarily
concerned with this.

Well, I already disagree with such policy. For starters, MSIE 6 for
windows is much more W3C web standards compliant (DOM 2 attributes and
methods) than many people think.
I personally code entirely according to W3C web standards and then, once
the code is working well with W3C web standards compliant browsers like
Opera 7 and Mozilla 1.5, I make relevant adjustements, if needed and
justified, for MSIE 6.
My policy is that a page must be both W3C web standards compliant (valid
markup code and CSS code) and work as best it can in MSIE 6, Mozilla 1.x
and Opera 7.x (in that order). So far, I have always achieved that goal
100% of the time.

is my code still problematic and badly formatted
for ie6 only?

Yes, I think so.

even though it functions up to an extent?
You have to understand that you still need your code to be optimized, to
use the most efficient manners to achieve your goals and resort to the
best coding techniques.
E.g. 2 aspects:
- any code which is repetitive is a sign that a parametrized loop (for
or while) could execute better, more efficiently your goals. Your opt1
var is a good example of this. There are others.
- too many variables, too many functions, scripts, dynamic creation,
removal, etc... too much cpu-RAM-demanding page usually lead modest user
system to crash
harsh critisism will not be take offense, i'm still learning how to do
this.

thanks again, kie

Thank you for saying so. Sometimes people might misinterpret my choice
of words, the care/importance/emphasis I might give to this or that issue.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top