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
javascript listbox to send as post
Old 03-27-2010, 09:46 AM javascript listbox to send as post
Junior Talker

Posts: 2
Name: John Crowhurst
Trades: 0
I found this wonderful script on the Internet that after a few subtle changes does a nice effort of moving from one list box to another.

http://www.plus2net.com/javascript_t...list-move.html

However, I need to pass this back to the server as an array and it simply doesn't work. Can anyone help?
fyremoon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-27-2010, 09:58 AM Re: javascript listbox to send as post
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It will be submitted to the server as a comma separated string. Your server side code will have to put it into an array.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 03-27-2010 at 09:59 AM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-27-2010, 11:47 AM Re: javascript listbox to send as post
Junior Talker

Posts: 2
Name: John Crowhurst
Trades: 0
However, when I dump the post values, the listbox variable is not listed.

I found this link:
http://onlinetools.org/tricks/using_multiple_select.php

Code:
<select name="test[]" multiple="multiple">
	<option value="one">one</option>
	<option value="two">two</option>
	<option value="three">three</option>
	<option value="four">four</option>
	<option value="five">five</option>
</select>
I notice that name=test[] rather than name=test. What do I need to do to the Javascript so that it accepts the name as test[] rather than test?
fyremoon is offline
Reply With Quote
View Public Profile
 
Old 03-27-2010, 12:06 PM Re: javascript listbox to send as post
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webbysoft.com/babelkit/doc/bk_select.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to javascript listbox to send as post
 

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.13346 seconds with 12 queries