Deleting array object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ms_chika

    Deleting array object


    Hi again to all,

    I just want to know how to delete array or array object in javascript?

    I have this problem, i have an html table that contains textboxes and
    delete button for each row, the contents of textboxes for each row are
    stored in an array. When i click the delete button it should delete the
    row from the table and also delete the row from the array that contains
    the data, but the problem is it is not deleted from the array and if i
    check the length of the array it's the same before deleting was done.
    So i guess, the array is not refreshed, so i might delete the array
    object, but i dont know how to do it. Or is there other way of
    refreshing the array?

    Please help.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Fred Oz

    #2
    Re: Deleting array object

    ms_chika wrote:[color=blue]
    > Hi again to all,
    >
    > I just want to know how to delete array or array object in javascript?[/color]
    [...]

    Seems you are looking to remove the part of the array that corresponds
    to the deleted rows. For a quick tutorial on the methods you can use
    with arrays, have a look here:

    <URL:http://www.w3schools.c om/js/js_obj_array.as p>

    Have fun.

    --
    Fred

    Comment

    • Mick White

      #3
      Re: Deleting array object

      ms_chika wrote:
      [color=blue]
      > Hi again to all,
      >
      > I just want to know how to delete array or array object in javascript?
      >[/color]
      [...]


      Array.splice (index, howMany, [element1][, ..., elementN])



      Mick

      Comment

      • ms_chika

        #4
        Re: Deleting array object

        thanks for replying. God bless!



        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        Working...