Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




Combo Box


I am working on an asp page and am having trouble with several things. First, I connect to Oracle and populate a combobox with the field values. No problem there. The next thing
I want to do then using the onchange event is update 2 textboxes with the min and max (on same form) with the min and max values from the database. The form is created dynamically using vbscript. When the user changes the value in the combo box I need the text boxes to automatically update with the min/max values. Thoughts?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Generating A Combo Box Depending On The Field Selected In A Former Combo Box
I 'm trying to display a combo box (which datas are coming from a database) depending on the select of another combo box in the same form. I think I should use the property onChange of JavaScript but don't know what to give in parameters.

In fact, I have an ASP function which generate a table containing the Strings obtained thanks to a request in a database. Then I'd like to put the Strings contained in the table, to a combo box. The combo box should refresh each time the user select another field in the former list. It must be developped dynamically.

Fill Combo Box Based On Another Combo Box
There are many comboboxes. One of them is where a user can select a
"State".

Based on the state, I want to select a "County". The form should populate
only the counties that apply to that State

I know how to do the JOIN if needed, but not quite sure how to pass the
value of the "State" combobox to the query that will be populating "County"

SELECT County
FROM Census
WHERE County = (value of the combobox "State")

Here is the code from the combobox "State" Code:

Combo Box
how i want to access the list of name from database with the combo box

Combo Box
Is there a way to implement a combo box, like in access in ASP? Or is there
another way to have the same result. I want to make a page where people can
choose an item in a list, but add one if it isn't in the list.

Combo Box Is Always On The Top
I would like to have div tag over combo box, not combo box over div tag. I have this problem on many pages usually when I use drop down menus. I try to solve this problem with z-index but it doesn't work. Have anybody some idea? Code:

Combo Value And Name
If I click the "Update" button on my form below, I can retrieve the value of
my combo by using code in the FORM RESULTS section below. Therefore, if I
choose the "Inside" option in my combo, I would get "1" as the value of my
combo box.

Is there any way to retrieve the Name associated with the value? So not only
retrieve the combo value of 1, but also retrieve the name "Inside" after
submitting my form? Code:

Combo Box
i have two option button and on combobox,in that combobox i added "all" statically.my need is if i select that first RADIO BUTTON that "all" in the combobox has to be enable and if i select that second RADIOBUTTON the "all" in the my combobox has to be disable.this is my need.

my first radiobutton name is all and second is select. tell me the coding and where i have to write that coding. please answer me becos i am new to this environment.

Combo Box
I have one customer request form. and in this for we have combo box with 3 selection i.e.

Cash
DD
Credit card

and i have maked another form for each selection menu(cash ,dd, credit card)so when client slelect any from combo then the coresponding form should be inserted between in the main form(request form). please help me with example code, how can i do this.

Combo Box Value
i use a hard code for combo box. for example: i put there gender: male / female. when i choose all the data, i can key in with all other input box. but when i edit. all the info that i want to edit will pop up in input box but for the combo box one i got problem. it couldn't show the value inside. it's empty.

how to return the value into the combo box. how to declare the function to return back the value.

Combo Box Value
I use often a combo box on my ASP pages. each time a form is submitted, the value of the combo box returns to the first selection But is there a way to avoid this and show always your latest selection ?

Combo Box
how can i reset the combo box or <select> in asp?

Combo Box Value
I have a form which enables users to search a database. Currently they can use a series of checkboxes and a text area. I would like to incorporate a combo box in this form. The values would be hard-coded. The user selects an option, which is included in the SQL statement along with those from the other form elements.

I'm not sure how to get the values form the combo box into a variable. There would be up to 40 values. Can anyone show me how to do this?

Combo Default Value
This is the code for a combo box, and I would like to make certain value the default value, so that appears unless users select somthing else.

call rs.Open("SELECT * FROM Trim.dbo.luDecisionMaker ORDER BY DecisionMakerName" _
, myCon)

do while not rs.EOF
Response.Write("<OPTION value=" & rs("DecisionMakerID"))
if rs("DecisionMakerID") = nDecisionMaker then
Response.Write(" selected")
end if
Response.Write(">" & _
rs("DecisionMakerName") & "</OPTION>" & Chr(10))
rs.MoveNext
loop

rs.Close

It comes from a table and has PropertyDetailsID(1,2,3,4) and PropertyDetailsname(Fee, 5,10,Other) and for example "Fee" needs to be the dafault value.

Resetting The Combo Box Value To 0
I have a search page where i have like 10 combo boxes and some radio buttons and check boxes.

Now when the page loads, i do some selection in the combo boxes and when i press reset button it clears all data in the form elements.

But when i select things in combo boxes and do a search by clicking OK button then the search results are displayed there and now if i want to clear all the form elements , i tried to click reset button, but when ever i did a search ie click ok button and after than press reset button reset button is not clearing the form elements.

Reason for this problem:

Reset button resets the form to it's state when it was loaded (as opposed to clearing the values) so if the page loaded with the search values in it, when you hit Reset nothing will happen if you haven't changed anything. Code:

Create A Combo Box In ASP 3.0
I want to take a text box that is in a grid and make it a combo box: Here is what the first part of the HTML looks like now:

<input type="text" name="txt_SERVICE_SN"
onkeypress="filterNonNumeric()" size="5" maxlength="3"
style="text-align:right"
onchange="fieldEdited(this.parentNode.parentNode)">

I tried switching the "text" to be "combobox" and that doesn't work.

I saw some other code for other combo boxes (not in the grid) and saw something like this:

<select id="test2"></select>

This will make a combo box. But I don't know why. I can't see anything in there that uniquely identifies this as a combo box.

Default Value For Combo Box
How do I make a value the default value for a combo box in ASP 3.0?

What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but not if I use it in a ASP 3.0 app.

<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>

String From A Combo Box
I would like to know how do we declare a string for combo box. I know for a textbox it would be:

strName = request.Form("txtName") - provided txtName is the name of the textbox.

Lets say name is the name of the combo box...

Do we declare like this? ....


Combo Selection
I am working in an asp/Vb script environment.In a form I have 2 combo boxes.first is main criteria and second one is sub criteria.in the first combo I have made predefined enteris(the headers of the table)say a table is:emp and its headers are:empid,empname,L1manager,accounts,location etc.

on a change event of first combo,I want to fetch the details from the table.say if I selected Ename in first combo.the second combo should automatically fetch the listed Enames and vice versa.

Selected Value From Combo Box
I have a drop down select box that gets filled from database. I have to add "All" to this list which does not come from database. Also the default selected value should be the second value that is stored in array. For ex I have array of Countries names as America, Indonesia,china, Canada. My array gives me the value Myarray(intcount,0)(intcount,1) as America and so on (two dimensional array).

I want Indonesia as the default selected value when the page loads. Also I need to hardcode All at the end. Upn submitting the form the selected value fromthe drop down should get selected.

Drop Down Combo
I have a drop down combo and on next page I want to get selected text of the combo. know howe to get value but not text.

Combo Box Selection
My left frame contains a combo box which loads the selected record in the main frame.The combo box retrieves concatenated 3 columns from my db. E.g. ID, Firstname & Surname.

Because of this, it seems to blow out the size of the frame,thus ruining my nav system.Does anyone know how I can restrict the box width, but allow the drop down part to remain wide?

Dynamic Combo Box
I want to create dynamic combobox. for eg if in a text box user enter a value the combox will populate from a table based on the value input in textbox. in the same page.

Autocomplete Combo Box In Asp
In visual basic we can use ms forms 2.1 object library to put a combo box that has autocomplete ability. but i want a combo box or drop down box that gets data from the database to have autocomplete ability when used in ASP.

How To Show More Than Column Value In Combo Box
I have a problem . I have a table of field name ,roll_name, age
I have to show name and roll_number in combo box list.

<select name=id1>
<option value="<rs(0)>"><%=rs(0)%><%=rs(1)%></option>

Populate A Combo With An Array
I have an array - ListOfFiles - that i want use to populate an combo.

I've attempted to do it like this:

<select name="txtAvailable" rows="4" id="txtAvailable">
<Script Language = "vbscript" Runat = "Server">
For i = 0 to Count -1
Response.Write"<OPTION>" & ListOfFiles(i) & "</OPTION>"
next
</script></select>

I placed the vbscript in the approprate place in the body. But when i
open the page instead of writing the HTML where i placed the code, it
has appended it right at the bottom of the page. Does anyone know
where i'm going wrong or if there's a better way of doing this?

Tooltip On Dropdown (Combo Box)
I use ASP (not .NET) for my web applications. I use IE6 SP1 for all my clients. Since title attribute doesn't work on IE6SP1, I cant get the tool tip running. I use tooltip to lessen the dropdown width.

Dynamic Combo Problem
i've got a combo that gets its values from a db. what i need is something like this code to make the item the user select to stay selected after the pages reloads(to execute the query).

this code works great with combo values inputted manually but how to do it whit dinamic ones?

<%
t="selected"
%>
...
<select name="combo1" >
<option value="value1" <%If Request("combo1")="value1" Then Response.Write (t)%>>id </option>
<option value="value2" <% If Request("combo1")="value2" Then Response.Write (t)%>>categoria </option>
</select>

i think that if i could switch the "value1" with a var it may do the trick but my syntax isn't good enough for it, and i've got lost in the way.

Retrieving Combo Box Values
I am having a form and I want to retrieve the values of the form fields. (using ASP & VBScript)I could retrieve the value of text box, etc, but having a problem when i try to retriee the selected value in a combo box. My code:

Combo Box In UPDATE Stmt
I am using an array to update multiple records from a single table. This works very well for text boxes but I can't get it to work for a combo box.

Here's a text input that works:

input name="txtPos<%= key %>" type="text" value="<%=(Recordset1.Fields.Item("Position").Value)%>" >

It reads the stored value for "Position", allows you to type a new value, and when you clik submit it updates the field.

Here's a combo box (doesn't work): Code:

Load From Database To The Combo Box
how to load the informations from database to a combo box using asp...eg:type of courses available..

Combo Click Event
how can set the combo so that when i click it, the code

<%

dim cStr
cStr = cboType

rs.Open "Select * from tblProduct Where type='" & cStr & "'",db

%>

Dependent Texbox Combo
I have an application in asp; in my form I have a combo and a textbox, the combo is fill in from a database query. I cannot do the following: when selecting an item from the combo, it should send the ID of the combo to a textbox. In other words, when selecting an item, it must send the ID to a query and the result of this query send it to the textbox. I need to do this using vbscript and the onchange method.

Declare A String For Combo Box
how do we declare a string for combo box.I know for a textbox it would be

strName = request.Form("txtName") -provided txtName is the name of the textbox.
Lets say name is the name of the combo box...

Do we declare like this ?

strName = request.Form("Name.selectedIndex") ??

Auto Complete Combo Box
I've got a combo box with the values:

AAA
ABA
ACA
BAB
BBB
BCB

If I type the letter "A" it jumps to "AAA" in the list. If I type the letters "AB" it jumps to "BAB" as "B" was the last letter typed. Is there a way to have it accept "AB" as "AB" and jump to "ABA"?

Combo Box With Bigger Width
I am using a combo box to fill it with some price value which does not require much space in a table. but to select this value the user require to see the relation of this price with other fields e.g

2.00usd - orange - spain
1.50usd - orange - brazil
2.50usd - apple - italy
2.25usd - apple - france

does anyone give a hint how to show above three fields without changing the width of combo box ?

Direcotry Listing In Combo Box
I plan to learn at some point). I just need a script so I can get a project I'm working on done. That being said, I need to take the listing of a directoy on the web site (a folder called drawing in the web pages directory) and dump it into a combo box for the user to select from.

When the user selects an item, it need to set a session variable that contains the filename so i can access it later on in a javascript. I think that its pretty simple, but as I said, I'm clueless about it.

Radio Button And Combo Box
how to create data dynamically in a combo box after clicking on a radio button ? Data are retrieved using a store procedure from a SQL Server.

For example :
Click Radio Button 1, the combo box should contains "A", "B", "C"
Click Radio Button 2, the combo box should contains "E", "F", "G"

The data can change dynamically after getting results from SQL Server. Please shed some lights to me. I have been trying to find a solution to this for a the past few days.

How To Fect Data From Table And Put Them Into Combo Box
i have Products table and how can i put them into a combo box??

Combo Box, Using Hashtable (associative Array)
I have a combobox and a textbox. Everytime the user changes the value in combobox, the value in textbox changes too. The data in both combobox and textbox are retrieved from database. I've tried to solve this problem using hashtable (associative array) but I can't pass the hashtable object from ASP to JScript. Btw, document.form.submit() cannot be used because the other data will be lost from the page. Can anybody give me a solution?

Radio Buttons & Combo Boxes
I have 2 radio buttons & 2 combo boxes.how can i change the combo box to enabled state only when the radio button associated to it is checked? I want this to happen at once (without having any submit buttons).

Auto Resize Dropdown List Of A Combo
Any code snippet or help link available on how to auto resize the dropdown list part of the combo(<select>) ?

Or, is there any alternative techniques for displaying the full lenth text when dropdown the combo?

Send Data From A Combo Box To A Text Field
I use dreamweaver and i have a combobox named country and a text field named email. I want the user choose a country from the combobox and the email for this country go to a text field. Lets say the user choose England from the combobox and an email will be puted in text box. I use PHP or ASP. This is my form:

<td><select name="country" id="country">
<option>1</option>
<option>2</option> </select>

<input name="email" type="text" id="email" value="email for the country in combo box"> </td>

How Can I Populate Many Fields By Selecting A Single Value From COMBO BOX
i should populate all the fields in the form just by selecting a single value in combo box. for example, my combo box contains client id s, and if i select an id, it should retreive the client name, address, coiuntry, city , fax etc.

how is this possible? if i use <select onchange="" > propety, i can change only a single value.

Populating 2nd Combo Box Dynamically On Making Selection From 1st Combobox
I m having three combo boxes on my asp page.
For 1st, i m fetching values thru a query.

For second, I want to populate it with values thru a query by giving the selection from first combobox as input.

Similarly for Third also i want to populate it with values using query by entering selection from second combobox as input.

So in other words second combobox is dependent on first and third combobox is dependent on second combobox.

Multi-column Combo Box, Change Width On Select
Has anybody ever seen or written code for ASP that would mimic Access'
multi-column combo box? Specifically, I have a drop down box that lists
about 100 five-digit codes. Each of these codes has a long text description
that explains what the code represents.

I'd like to be able to show the code plus description when the drop down
list is dropped down, but just the code when the list is not displayed, so
that I don't have to have a hugely long combo box taking up space. Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved