473,657 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retriveing Select Options collection in ASP

5 New Member
I've been wracking my brains trying to figure out how to do this, so I thought I would pop it out here for the experts, since my earlier attempts have ended in failure.

I'm trying to retrive a collection of <OPTION>'s from an HTML select list, and then loop through them to make them options in a CheckBoxList in VB.

Does anyone have a quick and dirty way to use Javascript to get this information, and then loop through it in VB to populate the drop down?

I'm not very strong in using Javascript inside my VB, so I think that's where the source of my issues come from.

Thanks!
Jun 12 '07 #1
1 1336
jhardman
3,406 Recognized Expert Specialist
I don't think you need to use javascript. Are you just posting the data to a vb program? the data should come like this:
Expand|Select|Wrap|Line Numbers
  1. request("myList") = "option1,option2, option5"
so if I wanted to loop thru these I would say:
Expand|Select|Wrap|Line Numbers
  1. myList = split(request("myList"), ",")
  2. for each x in myList
  3.    response.write x & "<br>" & vbNewLine
  4. next
Does this make sense?

Jared
Jun 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1582
by: Dennis M. Marks | last post by:
I have a problem with the following code. It generates a <FORM><SELECT><OPTION> list. There is no problem in the generating. The problem is in the execution as follows. It works fine in Mac IE with and without the <FORM></FORM>. In Mac Netscape 6 the onChange does not activate if there is no <FORM></FORM>. When I put it in a form as indicated below the value of train.options.value is undefined. What am I doing wrong?
6
3023
by: Sjaakie | last post by:
Hi there, I'm trying to get this working with Firefox. Can you point out what's wrong? No problems with IE, Firefox doens't fill selMonth... TIA >>> the script... >>> <select name="selDay" id="selDay" style="width:50;" ></select> - <select name="selMonth" id="selMonth" style="width:50;"></select> -
3
1459
by: Fabri | last post by:
How can I dynamically delete option from select object? I know to add: al.option = new Option('x','y'); but what about delete all or some? Thx in advance.
2
3482
by: mark4asp | last post by:
Why does this not work in Mozilla ? <http://homepage.ntlworld.com/mark.pawelek/code/animals.html> The optHabitat_change() event does not fire. What am I doing wrong here? PS: It should repopulate the 2nd combo based upon the value of the selected item in the first, just like it does in IE.
11
3016
by: Stefan Finzel | last post by:
Hi trying to remove one or all elements of select options fails for Pocket Internet Explorer. Is there a way to do this? if is_PIE { // this does not work on Pocket IE while (opt.length) { opt.remove(0); }
2
3650
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code /////////////////////////////////////////////////////////////////////////////////////// <form action="whatever.php" method="post"> <select name="zip_code" onchange="makeRequest('getCity.php?state='+this.form.zip_code.options.value)" multiple="multiple" size="20">
10
2249
by: mjpdatadev | last post by:
I am relatively new to XMLRequest, DOM and Ajax but I really like the functionality. I have the DIV and SPAN changes working well but I thought that I would experiment with changing the actual innerHTML of each control rather than changing the whole control inside of a DIV. What I tried was this: Create a <SELECTso... <SELECT id=MyComboBox> <OPTION>opt1</OPTION>
11
4493
by: Richard Maher | last post by:
Hi, I have read many of the copius entries on the subject of IE performance (or the lack thereof) when populating Select Lists. I don't mind the insert performance so much, (I get 100x120byte rows inserted/sec up to 500, and 100rows/6secs up to 3000, which isn't great but then the Row Count is clicking away for the user to see and they can hit the "cancel" button at anytime, so overall I'm happy), what really disappoints me is the...
3
1974
by: Italio Novuas | last post by:
Hi all, let me begin by saying that I *ALMOST* have this complete! What I'm trying to do is make it so my text area shows the innerHTML of any select item with the same value. For example, if I have a select list with 5 options: <select name="select" onChange="changeValues();"> <option value="1">Option 1</option> <option value="1">More stuff on option 1</option> <option value="1">EVEN more option one stuff!!</option> <option...
0
8407
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
8837
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
8739
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
8612
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
7347
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
6175
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
4171
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...
1
2739
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
1969
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.