I have a dropdown box that I list options in. I get these from an array that I created on the server side. When the user selects an item, this runs code to select the next level of items from the array. I clear the list options and reload the list with the next level and so on. The only problem that I have with this is that I have to have added enought <OPTION> slots to accomodate the longest list that I expect to generate because I don't know how to delete the former list of options then additems dynamically. My preference is VBScript but will resort to JScript if there's no other way
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?
I need to create a two level Login Page,one for Admin and the other for User.The Admin upon logging in will be able to edit the data whereas, the user can only browse the page.Does anyone know how I can do it using ASP and/or MS Access.
How do I create multiple criteria for ordering in a SQL string? That is, if i first want to order by Document Author, and within those results, order by Document Name, i.e
AUTHOR ----------- NAME Alan ---------- Doc Name 1 Alan ---------- Doc Name 2 Alan ---------- Doc Name 5 Bob ----------- Doc Name 3 Bob ----------- Doc Name 4 David --------- Doc Name 6 David --------- Doc Name 7 David --------- Doc Name 8
I have some problems with a page. This page has one drop down list and two listboxes. When the user selects a value in the drop down the form is posted back to the server and the first listbox is filled.
When the user click a button, the selected value in the firts listbox is copied to the second listbox, using JavaScript. I do it this way so the form is not posted each time the user selects a value. So far eveything is Ok.
The problem that I have is that each time the form is posted back (the user selects a new value in the drop down list), the values in the second listbox are cleared. What can I do to keep those values through posts? Here is the most significant code:
I have three listboxes 1 : company 2 : department 3 : function
I want the following functionality. when i choose a company all the available departments in that company must appear in listbox2 and when i choose a department all the available functions must appear. how can i do this with Java?
OK, I have here a great peice of coding to populate a listbox from the database. It works great, but for one thing. i can't seem to figure out how to populate 3 listboxes from 3 different tables in the database. Here's the code that works with one listbox. Can anyone please give some assistance with poplating 3 of them? Code:
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.
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.
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>
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
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.
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:
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.
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?
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.
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.
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?
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.
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.
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?
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.
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:
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:
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:
I have a list box that populates dynamically from a table. I want all items of the ListBox to be selected on page load as default options before user can highlight the items he wants...how would I do that?