473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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!
Jul 23 '05 #1
3 11704
ms_chika wrote:
Hi again to all,

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

[...]

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.com/js/js_obj_array.asp>

Have fun.

--
Fred
Jul 23 '05 #2
ms_chika wrote:
Hi again to all,

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

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

http://www.devguru.com/Technologies/...ef/splice.html

Mick
Jul 23 '05 #3
thanks for replying. God bless!

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: user | last post by:
Say I have an object (foo), that contains an array (bar) of references to other objects. Now I want to puff some of the objects from the array so that I remove the array element, and destroy...
20
by: Hanzo | last post by:
I'm iterating over a vector of base class pointers and deleting those which meet a certain criteria...i'm using pretty text-book code for the particular delete/erasure (it's straight out of Myers'...
15
by: Rick | last post by:
Hi, Does deleting an object more than one times incur undefined behavior? I think it doesn't but just making sure... thanks Rick
18
by: Dan | last post by:
hello, I would to know if it is possible to delete an instance in an array, The following does not allow me to do a delete. I am trying to find and delete the duplicate in an array, thanks ...
4
by: al havrilla | last post by:
hi all what does the phrase: "scalar deleting destructor" mean? i'm getting this in a debug error message using c++ 7.1 thanks Al
0
by: Bandit | last post by:
I'm populating a gridview (called docList) with document info from a network folder like so: Sub Show_Files(ByVal inputDir As String) Dim strFileNamePath As String = inputDir Dim dirInfo As...
3
by: Newcomsas | last post by:
Hello, I'm trying to solve a problem with JS textbox array without success. I have two buttons in my page: PLUS and MINUS; at every click on PLUS a new textbox named 'dear' is generated. So, if...
1
by: alacrite | last post by:
I have a class that is interacting with some code that takes an array in the form of pointer to the first object and size of array as arguments: quick example void foo(*obj o, int size ) I then...
13
by: programming | last post by:
how do i delete from a text file 1 of the following lines: jon|scott adam|smith <--delete paul|clark say i would like to delete the middle line of this txt, in member.txt what php code or...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.