Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how can i remove all rows from n tables in one form?

Reply
Thread Tools

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

 
 
kie
Guest
Posts: n/a
 
      09-30-2003
url explaining what i' trying to do @
http://www.kieran.f2s.com/remove_all...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...all_tables.htm
showing what i'm trying to do.
 
Reply With Quote
 
 
 
 
DU
Guest
Posts: n/a
 
      09-30-2003
kie wrote:

> url explaining what i' trying to do @
> http://www.kieran.f2s.com/remove_all...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...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/doctorunc...e7Section.html

 
Reply With Quote
 
 
 
 
kie
Guest
Posts: n/a
 
      10-01-2003
thanks, i'm looking through your web site now. especially the page
"Dynamic Table Formatting"
(http://www10.brinkster.com/doctorunc...ormatting.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
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      10-01-2003
kie wrote:
> thanks, i'm looking through your web site now. especially the page
> "Dynamic Table Formatting"
> (http://www10.brinkster.com/doctorunc...ormatting.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/doctorunc...e7Section.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
no method to remove all rows from DefaultTableModel Parvinder Java 2 06-15-2012 05:14 PM
Re: Why I can not remove all dialers after "remove"-I have two anti-dialers programs Joseph Ladovic Computer Security 3 05-26-2005 03:00 AM
script for moving rows up and down and traverse thru rows of HTML table Subba Rao via DotNetMonster.com ASP .Net 0 03-19-2005 06:46 AM
One button for editing all rows of a DataGrid Hrvoje Vrbanc ASP .Net Datagrid Control 1 09-24-2003 09:56 AM



Advertisments