homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Simple <select> box made complex
Can yoiu help me pass for data?
lZakl




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

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

 

lZakl




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved