PLEASE HELP W/ Adding item to a 2 dim array

Discussion in 'Javascript' started by HolaGoogle, Dec 11, 2003.

  1. HolaGoogle

    HolaGoogle Guest

    Hi all,

    Please help me with the following..it's realy urgent and i tried
    everything i could and i can't get it work properly!! Thanks in
    advance.

    Here's what i'm trying to accomplish:
    in my form i have a table with 3 rows (3 input text), in which user
    can enter values and then clik save. When he clicks the Save button,
    i'd like to be able to add the created items to the end of my table
    (by adding rows dynamically to a table) so that can create his own
    table dynamicaly with values he wants.
    the first row is my table index. goes from 0 to whatever the user
    wants....
    i know how to add an item to 1 dim array. i know how to insert row to
    a table using insertRow() but what i don't know is to put the whole
    thing together....

    <TABLE ID = "mytable">
    <td><INPUT TYPE="Text"NAME="TxtIndex" value=""></td>
    <td ><INPUT TYPE="Text"NAME="TxtName1"></td>
    <td ><INPUT TYPE="Text"NAME="TxtName2"></td>
    <input type="button" value ="Save" onclick="addItemToArray();">

    i want my addItemToArray() method to create new rows (with the right
    index and with values given by the user!!) any idea???

    please please please please please please

    Tx a million!
     
    HolaGoogle, Dec 11, 2003
    #1
    1. Advertising

  2. HolaGoogle

    HolaGoogle Guest

    Never mind guys! figured out how to do this!
    tx!
    (HolaGoogle) wrote in message news:<>...
    > Hi all,
    >
    > Please help me with the following..it's realy urgent and i tried
    > everything i could and i can't get it work properly!! Thanks in
    > advance.
    >
    > Here's what i'm trying to accomplish:
    > in my form i have a table with 3 rows (3 input text), in which user
    > can enter values and then clik save. When he clicks the Save button,
    > i'd like to be able to add the created items to the end of my table
    > (by adding rows dynamically to a table) so that can create his own
    > table dynamicaly with values he wants.
    > the first row is my table index. goes from 0 to whatever the user
    > wants....
    > i know how to add an item to 1 dim array. i know how to insert row to
    > a table using insertRow() but what i don't know is to put the whole
    > thing together....
    >
    > <TABLE ID = "mytable">
    > <td><INPUT TYPE="Text"NAME="TxtIndex" value=""></td>
    > <td ><INPUT TYPE="Text"NAME="TxtName1"></td>
    > <td ><INPUT TYPE="Text"NAME="TxtName2"></td>
    > <input type="button" value ="Save" onclick="addItemToArray();">
    >
    > i want my addItemToArray() method to create new rows (with the right
    > index and with values given by the user!!) any idea???
    >
    > please please please please please please
    >
    > Tx a million!
     
    HolaGoogle, Dec 12, 2003
    #2
    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. Sona
    Replies:
    10
    Views:
    575
    LibraryUser
    Sep 2, 2003
  2. Sona

    Single dim array as a multidim array?

    Sona, Sep 1, 2003, in forum: C Programming
    Replies:
    10
    Views:
    599
    LibraryUser
    Sep 2, 2003
  3. Denis Palas
    Replies:
    1
    Views:
    503
  4. Florian Kaufmann
    Replies:
    1
    Views:
    380
  5. Markus Dehmann
    Replies:
    9
    Views:
    220
    Tad McClellan
    Mar 23, 2005
Loading...

Share This Page