473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Request.form(listbox)

Hi - I'm using the function below, to add items from one list box, to
another - however, when I post the page back to iteself (ASP) and do a
request.form, it does not pick up any items in the second list - because
they're not hilighted when the page is posted.

Is there a way of picking up the items in the list, regardless of
whether they are selected ot not?

Thanks for any help, Mark

<SCRIPT LANGUAGE="JavaScript">
<!--

function Populate() {
frm=document.forms[0]
field1=frm.txtaddresslist
field2=frm.txtmemb

for(i=0, j=0;i<field1.length;i++) {
if(field1.options[i].selected) {
newOpt=field1.options[i].text
// a=field2.length
// alert(a)
// field2.length++
alert(field2.length)
a=field2.length
field2.options[a]= new Option(newOpt,newOpt)
j++
}
}
}

// -->
</SCRIPT>

Mark Tait
ma**@fixitks.co.uk
www.fixitks.co.uk

Mark Tait
ma**@fixitks.co.uk
www.fixitks.co.uk

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 5304
Mark Tait wrote:
Hi - I'm using the function below, to add items from one list box, to
another - however, when I post the page back to iteself (ASP) and do a
request.form, it does not pick up any items in the second list -
because they're not hilighted when the page is posted.

Is there a way of picking up the items in the list, regardless of
whether they are selected ot not?

No. The only data submitted by a form is data that is entered or selected by
the user. If the responding page needs to know all the items in the list,
you have to supply them either in the responding page, or use a hidden
textbox in the form that contains all the items. Hey! you could create a
hidden copy of the listbox that has all the values selected! Try that.

Bob Barrows
Jul 19 '05 #2

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

Similar topics

4
by: f_salazar | last post by:
English Version !! Hi !! I have a page with a Form, inside the form I have listbox with 'X' elements. Wend I submit the page, an ASP process inside the page have to read those elements and...
2
by: fripper | last post by:
When I have a populated list box in a web form in VB under VS .Net 2003 and then select an item by clicking it and then click a button to perform some function based on the selected item I find...
3
by: amber | last post by:
Hello, How can I change the title of my form, based on a value of a textbox on the form? And in what I assume is a similar question, how can I have the caption, or even column header in a...
1
by: bruce | last post by:
Hello, I have a small form that pops up when a user moves off the current record of a rather sizeable data entry form. The purpose of this form is to list warnings about various fields on the...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
0
by: piercy | last post by:
hey i need help creating a drag and drop code from two list boxes. i need it so that if they select multiple items it will drag them across. i also need buttons which will move the selection or all...
1
by: m-sjoblom | last post by:
Hi On a form listbox Access version 2003 has a limited number or characters that can be stored in a listbox when the Row source Type is set to "Value List". Is there anybody that knows the...
7
by: djpaul | last post by:
Hello, I have 2 forms and on both of them is a listbox. 1 is empty and the other one is filled. So i want to select some lines from the filled one (double click) and add it to the other on. Tried...
1
by: mfletcher | last post by:
Hi I have a query which calculates a large number of fields for each record, i don't want all of the fields present in the datasheet view only those fields selected by the user in a list box(or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.