Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 15th, 2003, 05:46 AM
scranmer scranmer is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Bristol, England
Posts: 3 scranmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation unknown functionality

html/dhtl/javascript/asp?!?

Not sure which of these I should be looking under so here is a description. I have seen on several web pages (but cannot find any now I want to have a go) where you have 2 large select boxes and add data from one site to the other or remove it back into the first box.

So I am after 3 thinks.
What the hell is this functionality called
Any poniters please
Any pointers to an example or two would be excellent.

TA

Simon.

Reply With Quote
  #2  
Old June 15th, 2003, 06:45 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Not 100% sure, but is this what your after?
http://www.mattkruse.com/javascript...tbox/index.html
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old June 15th, 2003, 07:00 AM
scranmer scranmer is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Bristol, England
Posts: 3 scranmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
stumpy,

thats the bugger, your a hero. So are they just called javacripts select boxes?

TA

Simon.

Reply With Quote
  #4  
Old June 15th, 2003, 08:33 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
They are just standard HTML form objects. They've got a few names. Most people call them "Select Lists" because their HTML tag is <SELECT>. They have 2 styles, one is where you have a listing of multiple options. The other is where only one option is shown, and you choose items by clicking the down arrow.

To add the functionality you are after, you need to use some Javascript. I've recently used the code found @ that link (thanks aspnewbie), and it works like a charm! If you need a hand submitting the results to a server-side processing script, let me know.

Reply With Quote
  #5  
Old June 15th, 2003, 01:15 PM
scranmer scranmer is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Bristol, England
Posts: 3 scranmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK you obviously knew I would have problems. Im using php to capture the data from this lists and am unable to find it ?!?

I have attached html & php files.

TA

Si.
Attached Files
File Type: zip selects.zip (1.2 KB, 425 views)

Reply With Quote
  #6  
Old June 15th, 2003, 06:21 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Ok.
1. Add a HIDDEN field to the form.
2. Add the ONSUBMIT event handler to the form - e.g.
Code:
<form name="frmSelect" action="foo.asp" method="post" onsubmit="procForm()">

3. Add this code to your JS include file
Code:
function selectGetOrder(cbox) {
   var outList = "";
   for(var i = 0; i < cbox.length; i++) {
     outList += cbox.options[i].value + ', ';
   }
   return outList;
}

4.Create the procForm() function. In this function, place any error handling you might need. Inside that function, place a call to the selectGetOrder(cbox) function. e.g.
Code:
retVal = selectGetOrder(document.frmFoo.selectListName)

This function will return a comma seperated list of values. Assign the returned value to your hidden field, then retreive the hidden field using your PHP script.

That outta do it!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > xfer options between select lists dynamically


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway