473,626 Members | 3,245 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 1735
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_Da rkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"middletree " <mi********@hto mail.com> wrote in message
news:e0******** ******@TK2MSFTN GP10.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_Da rkfalz.com> wrote in message
news:#f******** ******@tk2msftn gp13.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_Da rkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
..Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"middletree " <mi********@hto mail.com> wrote in message
news:e0******** ******@TK2MSFTN GP10.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(pstrF ldName) {
// Purpose: Refresh pg. to update other fld(s) based on selection.
// Remarks: Used by combo's onchange.
// Assumes existence of document.frmMai n.FocusedFldNam e hidden fld.

// Set focused fld for when come back.
document.frmMai n.FocusedFldNam e.value = pstrFldName;

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

// Submit pg to itself to refresh other combo based on this combo.
document.frmMai n.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
11981
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 write on the autofilled text elements. I have come to the idea of give those elements the event onFocus=functiontoMovetoNextElement() Then my question is how can I do that using the elements array?
5
12853
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 will then be converted into HTML and saved. I want to write a parser through vb.net that uses the word object model and was wondering how this could be achieved? The problem i am running into is that i can not test whether the selected text is...
7
1941
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 Explorer and Opera it works fine; 'Entry 3' shows up. Is this a bug within Mozilla Firefox or do I have any possibility to change this wrong behavior? Stefan ========================
11
1834
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 Needs Philosophers, by Steve Yegge, 2006 http://xahlee.org/Periodic_dosage_dir/_p/software_phil.html
2
3953
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 black background with 50% opacity to make it gray and shine through what is behind it). Similarly, I want to be able to shows links as blocks (like red on red with opacity 20%). I am trying firefox 1.5.0.9 and konqueror 3.5.5. I presume the...
4
13952
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 tbl_Input has three fields: OSE_Job, OSE_Name, OSE_Wt I have populated tbl_OSE_Info table. I need to create a form that will store the data in tbl_Input I have racked my brain so much trying to figure out how to auto populate a field based on a...
3
5444
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 users if it's ok to delete. Thanks in advance. i found one that was really close but it only looks at one folder. I need it to look at files within folders and subfolders too. Dim oFSO, wshShell, FileCol, oFolder, objTextFile, shareLength,...
7
14491
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 event (not changing the option box value on relaod i.e. not re-running the SQL query). ONLY on initial entry should the form FIRST selection option box should be populated using JDBC SQL.
0
1351
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 change the selection to that item. This works, however the keyboard cursor position remains at the last item selected with arrow keys or left click. How can I move this as well as the selection?
0
8269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
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
8711
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
8642
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...
1
8368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
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...
0
5576
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2630
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 we have to send another system
2
1515
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.