473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

move selection to next box

We have all seen those web pages which feature a multiple <select> box on
the left, and an empty one on the right, and the user selects one or several
options from the left box, clicks a button, and those selections appear in
the right box.

Although I have seen these, I have never tried coding them before, until
now. I imagine that there is some client-side code involved, but because my
code will use ASP to do some stuff with the selections, I figured it was OK
to ask it here. Can someone direct me to some sample code for this?

I have searched on some ASP code sites, but haven't found anything, probably
because I don't know a short description for this kind of thing.
Jul 19 '05 #1
3 1728
well, you have two options, only one of which applies here in a Server Side
group.
That would be to have the selection of the first one cause a .submit() to
happen where you can read the value and limit the second selection box
results.

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"middletree" <mi********@htomail.com> wrote in message
news:e0**************@TK2MSFTNGP10.phx.gbl...
We have all seen those web pages which feature a multiple <select> box on
the left, and an empty one on the right, and the user selects one or several options from the left box, clicks a button, and those selections appear in
the right box.

Although I have seen these, I have never tried coding them before, until
now. I imagine that there is some client-side code involved, but because my code will use ASP to do some stuff with the selections, I figured it was OK to ask it here. Can someone direct me to some sample code for this?

I have searched on some ASP code sites, but haven't found anything, probably because I don't know a short description for this kind of thing.

Jul 19 '05 #2
I do better with sample code. Know of any I could look at?
"Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
news:#f**************@tk2msftngp13.phx.gbl...
well, you have two options, only one of which applies here in a Server Side group.
That would be to have the selection of the first one cause a .submit() to
happen where you can read the value and limit the second selection box
results.

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
..Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"middletree" <mi********@htomail.com> wrote in message
news:e0**************@TK2MSFTNGP10.phx.gbl...
We have all seen those web pages which feature a multiple <select> box on the left, and an empty one on the right, and the user selects one or

several
options from the left box, clicks a button, and those selections appear in the right box.

Although I have seen these, I have never tried coding them before, until
now. I imagine that there is some client-side code involved, but because

my
code will use ASP to do some stuff with the selections, I figured it was

OK
to ask it here. Can someone direct me to some sample code for this?

I have searched on some ASP code sites, but haven't found anything,

probably
because I don't know a short description for this kind of thing.


Jul 19 '05 #3
I'd suggest using JavaScript to submit the page (assuming the page is
being posted back to itself anyway) and then if the page is a post, show
the extra info in the second listbox. You can see an example of this on
the sample database on the Web on my site -
www.bullschmidt.com/login.asp and then go to the Invoices dialog and
choose a rep in the listbox and notice that the page is posted to
itself, the customers listbox then gets the focus, and the customers
listbox only contains the customers for that rep.

And here's a function I've used to submit the page for this purpose:

function RefreshPg(pstrFldName) {
// Purpose: Refresh pg. to update other fld(s) based on selection.
// Remarks: Used by combo's onchange.
// Assumes existence of document.frmMain.FocusedFldName hidden fld.

// Set focused fld for when come back.
document.frmMain.FocusedFldName.value = pstrFldName;

// Msg.
alert("Refreshing page to update other field(s) based on your
selection.");

// Submit pg to itself to refresh other combo based on this combo.
document.frmMain.submit();
}

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4

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

Similar topics

7
11970
by: mcanedo | last post by:
Hi: I have several text elements in a form. Some of they are filled by the user, and then some are automatically filled based on the user input. Therefore I do not want the user to be able to...
5
12831
by: STeve | last post by:
Hey guys, I currently have a 100 page word document filled with various "articles". These articles are delimited by the Style of the text (IE. Heading 1 for the various titles) These articles...
7
1928
by: Stefan Mueller | last post by:
I choose 'Entry 4' and click then on the button 'Set' to set the index to 'Entry 2'. If you press now the cursor down key 'Entry 5' instead of 'Entry 3' shows up with Mozilla Firefox. With Internet...
11
1818
by: Xah Lee | last post by:
Of interest: • The Semicolon Wars, by Brian Hayes. 2006. http://www.americanscientist.org/template/AssetDetail/assetid/51982 in conjunction to this article, i recommend: • Software...
2
3949
by: ivowel | last post by:
Dear Experts: I am trying to write a css style that makes text invisible; visible-when-selected (so that at least a visible block appears over the selected text---like black foreground over...
4
13939
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt...
3
5431
by: jaeden99 | last post by:
I was wandering if nyone has a script to move files older than x days old? i've seen several to delete, but I don't want to delete. I would like to create a backup of the files first verify with...
7
14454
by: robtyketto | last post by:
Greetings, I'm slowly building up code to do the following:- Display TWO selection option boxes (cascading). If the FIRST selection option box changes then reload the jsp using onchange...
0
1341
by: ivan | last post by:
Hello, How do I move the keyboard cursor position in a Tix.HList? I am using an HList with the right mouse button bound to pop up a menu. If the right click is done on an unselected item, I...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
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
7178
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,...
0
7223
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...
1
4919
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...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.