Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Simple <select> box made complex

Can yoiu help me pass for data?



6:19 pm on Jul 18, 2006 (gmt 0)

10+ Year Member

I have taken a simple input list:

<select name="cat_start" size="10" multiple="multiple" style="width: 175px;">

and turned it into something a lot more usable, but more complicated on my end.

Now I have two lists. One empty and one full. List one contains 50 widgets that the customer can choose as many as they want. But to make it easy, I wrote a simple Javascript that moves a selected widget from select box one, to select box two.

My problem is: Now that I have X number of widgets in list two -- How do I pass those values through my form, as they are not "selected". To ask the customer to move the items they desire into list two, and to then make sure to highlight all items before the form is sent, is severely counterinuitive. Is there a way to pass the items in list two without the items being "selected"?

Thanks for your input!

-- Zak


7:18 pm on Jul 18, 2006 (gmt 0)

10+ Year Member

Figures! I post this after trying for 3 hours .. and I get a revalation ... Pretty simple really ... this is for those who run into the same problem ...

var cnt
for (cnt = 0; cnt < document.YourForm.YourList.length; cnt++)
document.YourFrame.YourList[cnt].selected = true;

-- Z


Featured Threads

Hot Threads This Week

Hot Threads This Month