Change ListBox Values On Selection

I would like to be able to setup a link on my page that will change in value depending on the index # in the listbox that is selected. Here is the code i have for the link:

<a href="editproduct.asp?Action=Edit&id=<%=Request("id")%>&cat=??????"> List It </a>

I would like it to be - cat=(list index that is selected)

View Replies


ADVERTISEMENT

Changing Values In 1 Listbox When Selecting Records In Another Listbox

I was wondering if you could help me with the following problem. I have 2 listboxes in my
webpage, 1 has cities, and the other lists the streets of the city from the first listbox.

When I click on a city, I want the 2nd listbox to populate with all streets in the city. The city and streets are saved in a database, so when the user selects the city, I will run a query on the database and populate the 2nd listbox with all streets.

How can I do this with normal ASP? I know how to do this with ASP.NET, but don't know how to activate this with normal ASP?

View Replies View Related

Listbox To Texbox (multiple Selection)

I have a list box containing:

Ford
Vauxhall
Nissan
Honda
Volvo

How can I select certain names and have them transferred to a text box ie.

if I click Ford, Honda, Volvo I want it to update the textback like [ Ford
Honda Volvo ] when I click each one (like in hotmail when your select email
addresses.

View Replies View Related

Listbox Current Selection And A Split/mid

Gone in 60 sec - MGM - 112mins - ID:2

etc etc for all the records

i want to be able to select one of the values and press my edit button (this should read in the curent listbox value and then remove all of the text except the bit to the right of the ":" this should then be put into a query string) ....

View Replies View Related

Insert Multiple Selection From Listbox To Database

after a lot of searches to see if i can get such a code on the net, i've finally come to ask my questions here bcoz i can see bits of code here n there on net but not what i really want.

i have a form with a listbox(lstduty) on it. i have been able to populate it with data(dutyName)from table 'duty' from a sql server 2000 database.

now when a user makes multiple selection and click the 'add' button, i want to be able to add it to another table in the database as below: Code:

View Replies View Related

Change Text Field Based On Menu Selection

ASP/javascript with a drop down populated by an access database. The drop down works fine but I cant figure out how to get it to change a value of a text field.

I want the value in the text field to change to reflect the data in another column in the table, same row. Code:

View Replies View Related

Change List Selection Makes Field Visible?

I have a survey/member form that gathers information. I would like to have a drop down list on a page that a user selects, either 1, 2 or 3.If 2 or 3 I would like to show on the form another field for information gathering ie:if a user has 1 cat, fields for cat name, sex & age show.

if a user has 2 cats, 2 fields show instead of one for each, and the same
for 3.....

View Replies View Related

ListBox Values From Database

I want to populate a listbox from a database. This listBox will contain the value of the Table PK. Whenever i chose an ID the input fields in the form below will change corresponding to the PK.

View Replies View Related

Change Dropdown Menu Values

I have 2 drop down menus with data populated dynamically from a database.

Category

Subcategory

If i select an appropriate category the subcategory should change instantly to show the subcategories relating to the selected category. But i can't use a form submit, because before the forms are other textboxes with other values that i don't want to wipe on a page refresh.

I need to somehow preload the categories and their related subcategories. I've been trawling through examples, most are harcoded combobox values which won't work for me.

View Replies View Related

Get Database Values And Change Them To A Letter

I have a dynamic table asp/vb that is returning records as expected. There are 7 fields that are returning boolean values based on whether there is or is not a meeting on those given days.

My table is returning TRUE and FALSE and all I want to do is create an if or select statement that will detect the values in these fields and change them as follows:

If true, then field = "R" (Wingdings2 R is a checked box)
If false, then field = "T"(Wingdings2 returns a x'd out box)

View Replies View Related

When Change The Directory Then Date Format Will Change

I have virtual directory where I run test.asp page with only this code inside:

<%Response.Write now()%>

As a result, if I go into the IE and browse for the test.asp page, I get :
1/22/2004 14:18:04

If I copy this page on some other(existing) virtual directory, I get as a
result 22.1.2004 14:19:06

If I create a new virtual directory and I copy the page there, I get :
1/22/2004 14:18:04

Seems like that IIS takes english date format even if my regional setting is
:
d.M.yyyy and I would like that date on the page is always like this:
22.1.2004 14:19:06

Where I can change this setting?

View Replies View Related

ASP _ Listbox

Is it possible to change the selected default option in a listbox on the 2nd page to the option selected in a listbox on the 1st page which ..i.e preventing the selected option from changing to the default option on the 2nd page (both the list boxes have the same value)...i am having a listbox which gets populated from a database using ASP.

View Replies View Related

Listbox With Two Columns?

I want to make a listbox which will show the results of two fields (the ID and the Name) of one table , but the one field (ID) will be the one to pass.

View Replies View Related

Value From Listbox In Hyperlink

Rather than doing this:

<A HREF="editpatient.asp?ID=1>View</A>

Can i do something like this instead? - and make it work

<A href="EDITPATIENT.asp?ID=" & LISTBOXPATIENT & ">View</A>

where LISTBOXPATIENT refers to a database populated listbox

The idea being that when the user is completing a form they can look up additional data on a patient by clicking the hyperlink next to the listbox.

View Replies View Related

Listbox Size

I have a drop-down with 40 option values and only one option should be selected of the 40 options. The list size should be 1.

When I click on the list, it drops down 30 options (a very long list) with a scrollbar for the last 10 options.

Is there any way, when I click on the list it drops down only 5 options (as if the list is of size 5) and allow a scrollbar to browse the remaining 35 options.

Code is:
<select name="deplist" id="deplist"
<option value="Commerce">Commerce</option>
<option value="Instru">Instrumentation</option>
... similar such 38 options
</select>

View Replies View Related

Listbox Width

I have 6 list boxes and it may or may not have data from db to get fill in.
so what happens is whatever has data that comes to the size of the maximum length of the data in that list box and others comes as very small width as there are no data.
but what i want is all list boxes width should be of moderate size.
how can i make those empty list boxes appear as moderate size.
I dont have an option to put an default item in the db to load with that

View Replies View Related

Listbox Selections

Does anyone know how to make a form take you to different pages depending on what is selected from a list box ? im using asp /sql / and dreamweaver ..

View Replies View Related

Populate Listbox

Im new to asp and I'm having trouble with listboxes.
I have two listboxes, the first is populated from a database and I need to fill a second listbox with items from the database that are dependant on what was selected in the first list box.

View Replies View Related

Figure Out Listbox

I want to select a value from a ListBox, and depending on that value, if it is the right one, it disables a textbox? Can this be done with Javascript?

View Replies View Related

ListBox Problems

the listbox on the left contains the names of employees

the listbox on the right contains the names of employees selected from the listbox on the left (ie by hitting the buttons they move across)

when I submit the form which those two list boxes sit on - I want to access the list on the right

currently on use valus=request.form("RListBox") - then I split the returned value from valus etc - however this ONLY works if I select each item in the listbox (making each entry highlighted)

what I would like to do is itinerate through each item in the listbox and get its (option) value. Code:

View Replies View Related

ListBox Control

I would like to create a listbox control in asp.net that has the capability of multiple columns like the Windows.Forms.ListBox control.

I have searched high and low and have only found advice such as concatenating the strings into one or using a ListView which do not seem ideal to me.

Would it be possible(and fairly easy) to create a Custom User Control, fill it with multiple listboxes and then programatically change the selected indexes of all of the ListBoxes when the selectedindex of one is changed?Custom Web Controls is another option but its apparently more complex to implement.

View Replies View Related

Updating A Listbox

I wanna update a listbox via another listbox and sending new values into database.How can i do it in asp vbscipt?

View Replies View Related

Listbox Item

if it is possible to narrow in on an item within a listbox of states. For example, right now if I type "W", I will immediately drop down to those states beggining with "W".

However if I type "WI", I go to the top of the list with those states beginning with "I". I would like to continue to zero in on the state by dropping down to those that begin with "WI". Is this possible and if so, how do I go about doing it?

View Replies View Related

'Autocompleting' Listbox

I would like to be able to use an autocompleting listbox - that is, one where you can select an item in the list by typing the first few characters; the standard IE listbox only responds to the first character.

I'm happy to pay a few quid for a 3rd-party component/activex control if necessary but I imagine something equally good could be done with client-side code.

View Replies View Related

Get The Value Of A Disabled Listbox

I found out that I can't get the value of a disabled field with Request("myField"). An alternative could be 'readonly', but my field, that is a listbox <select>, doesn't have this attribute.

View Replies View Related

ListBox Query

I have a listbox whose MULTIPLE selected values are retrieved using

Request.Form("<listboxname>")

This returned a comma separated array.I am gonna display these values one below the other on the screen. When i retrieve the values from the array using ArrayName(0),ArrayName(1),etc.. the values along with the COMMA are also displayed. When i Remove the Comma with a function like this..

somevariable=Instr(ArrayName(0),",") -1
It errs....

How to remove the comma while displaying?anyother method?

View Replies View Related

Update One Listbox From Another

I have 2 tables in my database, AUTHORITY and AREA. I have 2 listboxes on my ASP page. The first one selects all from AUTHORITY. I have one recordset so far, obviously pulling out these values from AUTHORITY.

What I want is to have listbox 2 automatically populate with values from AREA where a field = the value of AUTHORITY. I know this can be done with onChange events in Javascript but I can't work it out.

View Replies View Related

Borders In A ListBox

How do I get rid of the borders in a ListBox? There are atributes for TextBox and Image but I can find no way to do it for ListBox. What is CssClass artibute? If its the Css style it does not work either. Unless it has to be somewhere else rather then on the page, I tried it few times.

View Replies View Related

Listbox From Asp To Access

i have this form, which contians list boxes. wen a user selects his choice n clicks submit button. it gives an error of type mismatch. wat changes shud i make in my database table's datatype wen recieving data from a listbox? i tried selecting TEXT but it didnt work. cud there b another reason for this error?

View Replies View Related

Page 2 - Listbox

You should know the difference between the javascript and asp error. When the page cannot be displayed then it is ASP error and the line number mentioned will be the one in the actual asp file. When the page can be displayed and the error pop up then it is the javascript error, for this kind of error you have to check the source file for the line number.

I hope now u will be able to differentiate the error and to look for the correct line which is causing the error. Back to the error you have mentioned. Does the main_head.asp have the javascript function called alterTab()? Remove this include file and try whether it cause the same error.

View Replies View Related

Dynamic Dependent ListBox

I have a database table called Pumpdata. This table contains all the different pumps available. I had to make 2 other related tables one called pumpType which is just a description of Pump Types. ie.. (single, double, mixer etc..) and the other table is PumpManufacturer which contains a list of Pump Manufacturers.. the 2 tables are related to the pumpdatatable based on the TypeID (in PumpType) and MfgID(in PumpManufacturer)..

Ok the problem I'm faced with Is I need to create a form to get a particular pump based on the Pump Type, The manufacturer, and then the specific Model Number..

The First list box alllows the user to select the Pump Type, The second ListBox allows the user to select the manufacturers based on the pump selection. (Note in the pumpdata table there could be an occurance where a particulatar PumpManufacturer could have several Pumps of the same type (I just need to show one occurance of the PumpManufacturer here). Code:

View Replies View Related

Updating Listbox With 2 RecordSets (ASP And SQL)

I am creating an update user module. and the dropdown boxes are DB driven. But when i pass the user details to this form i have problem highlighting the selected option in the listbox.

I would like to create a DB driven listbox. one recordset is used to list all the countries into the list. the 2nd recordset is used to add the selected value. But I could only list all the countries into the box and not able to preselect the country. Below is my code and hope someone could highlight to me my mistake. Code:

View Replies View Related

First Record Not Loading In Listbox(es)

I joined the group few days ago after discovering that this forum has a lot to offer and the forum threads also pops up on my google desktop almost every 5mins giving me an update on the forum.

Actually,i have a problem here.After fighting with the code found below for several weeks,it turned out to be successful.

The code is suppose to automatically load dropdown boxes from a database based on a given value from previous page,say from 1 to infinity,but after loading,it ignores the first record in each of the listboxes.Can someone help me out with this?What have i done wrong?
Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved