javascript...splice()

by "tim booker" <timbooker(at)lineone.net>

 Date:  Mon, 17 Jan 2000 13:47:45 -0000
 To:  "hwg techniques (E-mail)" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
Hello All,


I'm using JavaScript to create a simple shopping cart device.

All of the items are stored in an array.

I'm having some difficulty creating a function to remove items from the
cart.  Basically, I need a simple way of totally removing an item from the
array.

A JavaScript reference book I've looked at suggests that the splice() method
will do just what I'm looking for.  However, the book in question doesn't
offer any syntax for splice().

Does anyone know the syntax to use splice() to remove an item from an array?

Can anyone suggest an alternative method to remove an element from the
array?

By which browsers is splice() supported?

I've looked at about five JavaScript books and found nothing except a
passing reference to the splice() method.


Thank you in advance,

Tim

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA