473,770 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4670
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 incompatibiliti es, 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 selectAllOption s() 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
19358
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 able to fill that one out just fine. The second form is multipart/form-data. Unfortunately, I haven't been able to fill that out in a way that makes the server happy. I set up a copy of this form at my web site so that I could see exactly what a...
16
9535
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 href="pagetwo.php?says=meaning"><img src="smiley.gif"></a> Pick one from drop-down menu: <p> <form> <select name=meaning>
2
22283
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() the problem is, i want to have a button to finish the selection and save all the data to a database, but if i have diferent forms, i will not get the last change on the text boxs, only th last change when i changed the combobox. Using the same...
4
4274
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 used for the submit button: <input type="submit" name="saverecord" value="push me to save"> Then I'd retrieve it using something like:
4
3516
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 click a button on a pop-up window the javascript for that button click does a 'button.form.submit'. On the Server side there is a Button click event for this button, but for some reason it no longer fires. It worked fine before and everything...
1
4001
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 context menu shows up. I have 2 questions: 1) how do I find out which menu item was clicked so I can use my Select Case statement to perform appropriate actions depending on menu
0
1166
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 Me.MySelect.Items If ThisItem.Selected = True Then ' Do something End If Next
1
2323
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' action=''> <select name='select'> <option value='A'>Item A</option> <option value='B'>Item B</option> <option value='C'>Item C</option> <option value='D'>Item D</option>
7
2087
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 controls (banner, top-menu and sub-menu). The top-menu contains like five asp:buttons. Further down the form there is search field with another asp:button. And I naturally want this button to act as submit button in the sense that when
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.