473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Submit button to select all items in a SELECT menu

Hi folks,

The user interface I'm trying to impliment looks a bit like
this:

Not Chosen Chosen
.------------. .------------.
|Item 1 | -> |Item 3 |
|Item 2 | <- |Item 4 |
|Item 6 | >> |Item 5 |
| | << |Item 7 |
`------------' `------------'

[Submit button]

All works so far, however, items not selected in the right
hand SELECT menu don't get passed as values when submitted.
Is there a recommended way to automatically select all items
in a SELECT menu on the click of the Submit button?

Any bits of code or URL suggestions most appreciated. Thanks.

Jul 23 '05 #1
3 4649
Gumtree wrote:
Hi folks, [...] All works so far, however, items not selected in the right
All what?

Any bits of code or URL suggestions most appreciated. Thanks.


Perhaps if you post a concise example of what you have done you will
get some help. I can think of at least 4 different ways of
implementing what you describe, all of which may be totally different
to how you have done it.

Zif.
Jul 23 '05 #2
Zifud <zi***@hotmail.com> wrote:
Gumtree wrote:
Hi folks, [...]


] The user interface I'm trying to impliment looks a bit like
] this:
]
] Not Chosen Chosen
] .------------. .------------.
] |Item 1 | -> |Item 3 |
] |Item 2 | <- |Item 4 |
] |Item 6 | >> |Item 5 |
] | | << |Item 7 |
] `------------' `------------'
]
] [Submit button]
All works so far, however, items not selected in the right


All what?


The interface: ie, the JS that covers moving items from List 1
to List 2 and back -- individually and groups.
Any bits of code or URL suggestions most appreciated. Thanks.


Perhaps if you post a concise example of what you have done you will
get some help.


There was hardly any point rabbitting on about the code that
works, considering it was irrelevant to the problem. The
question was:

] items not selected in the right hand SELECT menu don't get passed
] as values when submitted. Is there a recommended way to automatically
] select all items in a SELECT menu on the click of the Submit button?

(God only knows why you snipped the question in your reply...)
I can think of at least 4 different ways of
implementing what you describe, all of which may be totally different
to how you have done it.


Not to worry. I ended up redesigning the interface so as to not
need Javascript.

The Javascript would have been prettier UI, but, the replacement
is functional. Quite a relief though not to have to worry about
the idiocies of client browser incompatibilities, the effects of
JS not being enabled on browsers, etc.

All the best.

Jul 23 '05 #3
Gumtree wrote:
The user interface I'm trying to impliment looks a bit like
this:
Not Chosen Chosen
.------------. .------------.
|Item 1 | -> |Item 3 |
|Item 2 | <- |Item 4 |
|Item 6 | >> |Item 5 |
| | << |Item 7 |
`------------' `------------'
I have a lib which implements this exact functionality. It stores values in
hidden fields to keep track of which items were added or removed from each
list, plus all the contents of each list. I prefer this method to selecting
all options in the target list before submitting.

http://www.javascripttoolbox.com/optiontransfer/
Is there a recommended way to automatically select all items
in a SELECT menu on the click of the Submit button?


If you did want to go this route, you could use selectAllOptions() in my
functions at
http://www.javascripttoolbox.com/selectbox/

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
16
by: Ben Sharvy | last post by:
I want to get the user's choice of some menu items, and pass them to a (PHP) page in the URL, rather than with "Submit" button. I tried this, but it doesn't work: <a...
2
by: a10392 | last post by:
Hi, I'am triyng to create a form where i have 2 comboBox and 2 textbox, when the selection changes on the first combo , the content of second also changes. i have to use onchange=form.submit() ...
4
by: Jiho Han | last post by:
What is the best way to check whether the page is simply a postback or the form has been submit with the intention of doing something? In the olden days, I used to check for a form field name...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
1
by: Dino Buljubasic | last post by:
Hi, I have a toolbar with several buttons on it, one of which is set up to be as a DropDown button. I also have a context menu with menu items assigend to it so when I click that button, my...
0
by: TCook | last post by:
Hey All, I'm trapping a 'submit' button's 'Click' event in a VB.Net code behind class in order to loop through a 'Select' controls 'option' list as follows: For Each ThisItem In...
1
by: kevin | last post by:
I was wondering using only javascript i am trying to figure this out. Lets say i have a drop down menu with the following items in it\ <form id='frmitems' name='frmitems' method='post'...
7
by: Bjorn Sagbakken | last post by:
Hello. There maybe an simple answer to this, but sometimes one get a strange blindness when working intensely on one single problem. I'm using ASP.NET 2003, building pages that include 3 user...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.