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

Discussion in 'Javascript' started by kie, Sep 30, 2003.

  1. kie

    kie Guest

    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.
    kie, Sep 30, 2003
    #1
    1. Advertising

  2. kie

    DU Guest

    kie wrote:

    > 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
    DU, Sep 30, 2003
    #2
    1. Advertising

  3. kie

    kie Guest

    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
    kie, Oct 1, 2003
    #3
  4. kie

    DU Guest

    kie wrote:
    > 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
    DU, Oct 1, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SSP
    Replies:
    5
    Views:
    842
  2. Fredrik Rodin

    Remove all session keys except one

    Fredrik Rodin, Jun 1, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,952
    =?Utf-8?B?RGF2aWQgQ29lLCBNQ1A=?=
    Jun 1, 2004
  3. Parvinder
    Replies:
    2
    Views:
    6,978
    PuneetNanda9
    Jun 15, 2012
  4. Merciadri Luca
    Replies:
    4
    Views:
    796
  5. Hrvoje Vrbanc

    One button for editing all rows of a DataGrid

    Hrvoje Vrbanc, Sep 23, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    159
    Saravana
    Sep 24, 2003
Loading...

Share This Page