Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Array + Splice + undefined
Old 01-22-2007, 07:34 AM Array + Splice + undefined
numbenator's Avatar
Webmaster Talker

Posts: 516
Location: London
Trades: 0
Hi

I, using an array

var item_links = new Array();

I populate the array at certaini times in page processing.

item_links[link_array_cnt] = "<a href='" + link_url +"'>" + link_name + "</a>&nbsp;<a href='#' class='required' style='font-size:11px' onclick='remove_link(" + link_array_cnt + ") ; return false; '>remove</a>";


My problem is,

When i use

item_links.splice(array_id,1);

The element array_id isn't actually removed.


SO

HOW DO I REMOVE A ELEMENT FROM AN ARRAY AND THEN RE INDEX THAT ARRAY SO I DONT GET "undefined" IN MY OUTPUT OF THE ARRAY.

IE
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Reply     « Reply to Array + Splice + undefined
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11807 seconds with 12 queries