Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2004, 10:45 AM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox with multiple vlaues on item ( AAA , 111)

Can someone please help me with a listbox whcih has 2 values on each listitem. for Example AAA, 111
                      BBB, 222

How to retrieve the value and store them in text box

Please help.




 
Old December 7th, 2004, 06:04 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

mmm, have I understood you correctly?

1..You have a select box, EG:
   <option>AAA,111</option>
2..If AAA,111 is selected you want to place them in a textarea?
   <textarea>AAA,111</option>

If so this would be better suited in the JavaScript forum, anyway:
<script>
function moveValues()
{
  if (document.fromName.selectBoxName.value == "AAA,111")
  {
    document.fromName.textAreaName.value = "AAA,111"
  }
  else if (document.fromName.seectBoxName.value == "someOtherValue")
  {
     document.fromName.textAreaName.value = "someOtherValue"
  }
}
</script>

Then in your select tag fire the function onChange:
<select name="selectBoxName" onChange="moveText();">

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox Item selection caterpillar ASP.NET 1.0 and 1.1 Professional 1 July 26th, 2006 12:50 PM
One item in Listbox venterjo General .NET 2 February 1st, 2005 05:45 AM
Selecting an Item from a databound listbox nyclimber ASP.NET 1.0 and 1.1 Professional 4 May 25th, 2004 03:24 PM
How to get selected Item from Listbox? Iceman571 ADO.NET 1 March 25th, 2004 06:33 AM
listbox, different color for each item? MichaelTJ ADO.NET 1 November 13th, 2003 10:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.