Sorting the array - reversing the sequence codes?

This is a discussion on "Sorting the array - reversing the sequence codes?" within the Flash & Multimedia Forum section. This forum, and the thread "Sorting the array - reversing the sequence codes? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 3rd, 2005, 00:55
Junior Member
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Sorting the array - reversing the sequence codes?

Hi

really need help here

i have input an array into a listbox, and wanted to sort it the other way ( cos the content displayed when clicked and the item in the listbox are opposite!) so the listbox will be displayed as 1. orange 2. grape 3. apple
where the original array is 1. apple 2. grape and lastly orange. I need the listbox arrangement as the content, or else upon click, the content will not match the items in the listbox.

I have tried using array.sort and realise that it doesnt affect the arrangement in listbox. With SortListBox(), i can only sort by "label"/"data" and "ASC"/"DESC". All the results focus mainly on the alphabets of the items, and does not get what i want.

Is there a method to resolve this?

i have insert some codes that i think might be related, hope it helps

thanks

Code: Select all
// input items into listbox
function setupFeatureList() {
 for(var item in fTitle){
	featureList.addItem(fTitle[item]);
	
}

}

// this doesnt help coz theres only ASC n DESC no reverse

function sortListBox () {

featureList.sortItemsBy("label", "reverse");

	
}
Reply With Quote

  #2 (permalink)  
Old Aug 3rd, 2005, 01:52
Junior Member
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
after much thinking, i managed to solve this.. just reverse the arrays in the content n add in another one for the listbox will do
Reply With Quote
Reply

Tags
sorting, array, reversing, sequence, codes

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help sorting an array djeyewater PHP Forum 6 Apr 18th, 2008 15:16
[SOLVED] Array sorting welshstew Classic ASP 6 Nov 28th, 2007 16:45
Sorting a PHP array fallen_angel PHP Forum 3 Apr 20th, 2007 22:18
Sorting a new array from an existing array Ozeona Flash & Multimedia Forum 2 Sep 20th, 2005 08:43
reversing records benbacardi Classic ASP 2 Sep 4th, 2004 16:59


All times are GMT. The time now is 07:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43