ASP/JavaScript Dependent Dropdown Menus??
i'm trying to create a dependent dropdown menu based on two objects, packages and steps (the steps dropdown will be dynamically updated/populated when a package is selected). the site uses ASP and since ASP is server-side, i am using JavaScript to handle the client-side "dynamic" change.
i've found several snippets of code that create the dependent dropdown; however, the two examples i have use arrays which are statically defined. the data that will populate the dropdowns is coming from a SQL database, and that data will be updated/changed fairly often. my question is this: is there any way to generate the arrays using ASP (outside javascript tags) and use them in the javascript?
or is there a way to use javascript to generate the correct arrays and fill them with data from my SQL tables? can i use a recordset ojbect in javascript? i have heard that you may use PHP inside javascript tags, but i'm unsure if that is what i want to do.. especially since i am using ASP as the main language for this site. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dependent Dropdown Box
I have a dropdown box getting data from a database, and I send the data to the database on form submition, But, I need to send another data to another column to the database according with the user dropdown box selecion. Example. Dropdown option 1: DELL Corp. Dropdown option 2: IBM Corp. Dropdown option 3: Avante Systems If the user select DELL Corp., it will send 'DELL Corp.' to the database but I need it to send dell.jpg to another column too. I have the code to send the data, but the relationship of the boxes is 'the thing'. A solution almost like bellow is what I am looking for, but instead of, the selection in the first combo should point to another selecion in the second combo (so the second combo will have the dell.jpg value): http://forums.aspfree.com/code-bank...own-137839.html
Dynamic Dependent Dropdown Lists?
I want to have dependent dynamic dropdown lists where the person can select the state, then county, then zip code, and all 3 of these menus will be populated by a database. I have a page that Ive been working on but I just cant get it. The page I am working on also refreshes when you select the state, then when you select the county it refreshes again but instead of populating the zipcode list it just takes the state name and inserts it into the city menu. Code:
Nav Menus
Im putting my website together, and I have made some simple text buttons that are aligned across the top of my page from left to right.Anyway, I have with this navigation a need to have more navigation options, which I hope to gain by having sub-menus appear when you roll over the button. What I mean is how do I or can someone point me to a tutorial that will allow me to have a dynamic drop down menu generated via asp with data from a access databse that will allow the user to navigate to that sub menu content.
Pop Up Menus
Hope you can help with a small problem I am having. I have a very simple table displayed on a page - ID Name 1 x 2 y 3 z and what I am trying to do is this - Roll over the ID number and display a pop up menu (which has more links to run other ASP scripts) and pass the ID number from the original page, though the pop-up menu and into the final ASP script (as selected on the popup menu) as a parameter for an SQL query.
Dependent List
Can someone tell me why my "select2" menulist disappears?? Code:
Dependent Dropdowns
i have a form and i need the selection from the first dropdown to influence the results on the second dropdown.The first dropdown will have a list of guesthouses and based on the guesthouse chosen, the second dropdown will give the rooms available in that chosen guesthouse.
Dependent Check Box
currently need to do a dependent checkbox, mean when i choose 1st check box, 2nd check box will become visible and if i never choose it, 2nd checkbox will become blur and unclickable. may i know how to do it?
Drop Down Menus
I want to have a drop down menu, that when you select an option, loads data from the database into another drop down menu. So that's one part I don't know how to do. There will be a total of three options from the first dropdown, which represent different tables in the same database. So that's the other problem, how to load, depending on the table selected, into the drop down menu.
Select Menus
I am trying to figure out how to pass one selectedIndex value to another select menu on a subsequent page without opening the page in a new window. I know how to pass information from one text field to another using Request.form or a Session, but I am not certain how this works with select menus. I have seen other examples that require you to open a new window, but again I would prefer not to do this. I have two different select menus. This appears on the first asp page. <form class="fbox-form" name="form" action="" method="post" <select name="movietype" onchange="this.form.action=this.options[this.selectedIndex].value"> <option value='' "> </option> <option value="dvd.asp">DVD</option> <option value="tape.asp">Tape</option> <option value="reviews">Revews</option> </select> <select name="area"> <option value=" ''> </option> <option value="North">North</option> <option value="Southwest">Southwest</option> <option value="East">East</option> </select> <input name="continue" type="button"> </form> The next page has the exact same select menus as above and I would like it to populate the same value the user chooses from the first form page. I should state that the first select menu does redirect the user to different pages, however it should not matter because the above options for the select menus are consistent on all the pages the user is redirected to. I'm assuming the answer to my query will consist of utilizing ASP and JavaScript, however if not, I'm still game.
DB Driven Pop Out Menus
Does anyone know where I can find any resources for dynamically creating pop out menus using a database backend for the links?
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:
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.
Dependent Drop Down List
provide me a sample code for dependent drop down lists?I need to create a few drop down lists and they are dependent of each other. Their relations are very complex as 1 drop down list may affect 2 drop down lists.
Dynamic Dependent List
I have a set of dynamic dependent list boxes that are populted from a database. When I select the first box the second box is populetd with the correct items. If the first item is the desired selection another option has to be selected and then the first item has to be reselected for the list to work properly to update the next dynamic list box. To include the --Select-- in the second and third list box table would add several thousand rows to the table. If I added the --Select-- in the table it would add several thousand rows to the database.
Search Using Drop Down Menus
I have a search page with 5 drop down menus(where data pulled from access database. how do i give the select query , which will bring out results depending on the search critieria/fields set by user. for example the fields are first name, last name ,city, age,education. if a particular city is choosen i want al the rows that matches the city filed. if age and city are choosen .i want the results which has the age in that particular citty.
Performance On Drop-down Menus
I have a simple data entry form that has text boxes and some drop-down menus per row. My problem is the performance of the page. I give the user the option of displaying 25, 50 or 100 rows at a time. Each row has 12 text boxes and 4 drop-down menus. The OPTIONS for the drop-down menus are being populated with data from our MS SQL database. I'm using VIEWS to get the data and place them in recordsets, but how can I increase performance. It's taking way too long for the page to load and if the user clicks submits.. that takes a long time too.
Drop Down Menus And Value Changing
I have an asp form that submits information to a database. On this form, I have a drop down box with about 15 options, each with thier own value. The selection is down a bit in the form, after user fills out certain information. On the same form, I have a hidden value stated for "assigned_to" field. Most of the options in my drop down menu need an "assigned_to" value=35 and one option needs an "assigned_to" value=40 . How can I do this?
Dependant Drop Menus
How do I make a dependant drop box? For example, when a user selects Item5 on the first drop menu the second one populates with the options for Item5? I know it will probably use Java of some sort but I do not know the code.
Linked Form Menus
I currently have a page with car manufacturers in a dynamic form menu. Users can select one and click submit to find available cars by that manufacturer. What i now need is a second menu on the page where when a manufacturer is selected, the models associated with that manufacturer display for a user to choose. For example if Ford is selected: Menu One Menu Two ------------------ ----------------- Ford Focus Fiesta Ka.... Can i do this with ASP to say "if menu one is ford, menu two contains...."? Or is there a much easier way which i am somehow missing?
Multiple List Boxes Dependent
I am working on a survey form. I need to create multiple-multiple dependent istboxes...I need to allow the user to make multiple selection from a categoryListbox and as the user select from categoryListbox must display and add available subcategories into the subCategoryListbox and allow to select multiple subcategoris.
How To Create Menu With Sub Menus Dynamicly
I've got a problem with asp.net i am trying to make a menu control. and have searched the web for serveral controls but they don't work correctly. I am pretty new to asp.net building. What am i looking for. i am looking for code to make a dynamical menu with submenus The menu items are stored in a MS SQL Table and when by loading the page the items will be created. i have made a asp table. i want my menu on the left cell, in the middle cell i want to change my pages to the menu item choosen. Code:
Parent-Child Form Menus
I have two menu form elements that need to refelect a parent child relationship. There are 85 zones and 2200 zone-network combinations. I want to bind the networkid element to an xml datasource that contains only the networks related to that zone. I have read about something like this before but have never implemented it. create table tblZone ( zoneid int, zonename varchar(20)) create table tblNetwork ( networkid int, zoneid int, networkname varchar(20)) <select name="zoneid" onChange="reloadNetworks()">...</select> <select name="networkid">...</select>
Dependent Queries In Access And Entry Date
I have a created a cost reporting system which shows a level-breakdown report. There are three levels in the report the lowest level holds the cost items that are entered by the user these records also have an Entry Date. The level above that is a Sum of the lowest level and the top level is the Sum of the second level. I created the solution using three queries in Access. I then use the queries in ASP to generate the report. But now I need to use the Entry Date at the lowest level to re-generate the report with values from the StartDate to the EntryDate (which is entered by the user). Question is, can I do this using the construction I use, or do I have to pull my queries to the ASP code and include the dynamic EntryDate? How do I solve this?
Locale-dependent Date&Time Input Via HTML Forms -
In our legacy asp/web-application, we have date/time-input form in USA style (i.e. mm/dd/yyyy and 12hour-scale time with AM/PM). There is also some validation code on client side, and then submitted data are used in MSSQL queries. Now I would like to know about how to generate locale-dependent HTML form layout, and what ready-made ASP code could I borrow for this task.
CSS Dropdown
Does anyone have any code to display a dynamic dropdown menu (similar to Windows Start menu)? There seems to be a browser compatability problem with most that I've seen.
Get Value From Dropdown
I am trying to get the value of a dropdown box which is populated from a access database. <% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open(Server.Mappath("mydb.mdb")) set rs=Server.CreateObject("ADODB.recordset") sql="SELECT DISTINCT Company FROM Customers ORDER BY Company" rs.Open sql,conn company=request.form("company") %> I need to send dthe value of this dropdown to the next page which will response.write the company name. Any ideas on how to do this?
3rd Dropdown
i had done coding for two dependent dynamic drop down boxes.taking code from http://forums.aspfree.com/t53159/s.html......it is working nice but now select 2nd box and populate 3rd one.i m very confused how make a changes in code for 3rd one.if any of u have time i can send my code for urs technicalful advise
Dropdown Box
I have code to present on this forum, but not with me at the moment. This is what is happening now. On my page there is a drop down box that calls on an onChange javascript function. The drop down box dynamically displays locations depending on the location of the cars. Therefore...if Toyota Camrys are in Philadelphia and New York, the drop-down box will display: ALL, Philadelphia, and New York. Selecting one will filter out only those in that location. What i want to do is...change it so...it displays dynamically the locations horizontally...here is an example: PREFERED LOCATION? ALL PHILADELPHIA NEW YORK (all are links to filter out those that do not match the location). i need to do it to save space and make it more user-friendly.
Getting Dropdown Value
I know this is supposed to be easy but I can't get this to work. I have a dropdown that pulls all the Projects (tp_title) available. All I want to do is get the ID (tp_id) of that record so I can get the developer assigned to that project (tp_assigned_to). Then, when I get the developer, I need that to be redirected to a second page. Code:
ASP Dropdown & XML
I've got an XML file that I use to populate a treeview control and a dropdown box. That works fine, although I now want to be able to sort the list of people in the dropdown list. Someone suggested using an XML template, but I'm a bit of an XML newbie and not sure how to do this. Code:
Dropdown Box
Lets say you have a dropdown box with few options in it. Several products have such a dropdown box. is there a way to do this following stuff. I want one of that options in the dropdown box to be 'unique'. When selected, it would dissapear, or it can't be clicked on, on another product's dropdown. 'yes or no' answer would do just fine for now.
Dropdown
Now that I can store variables from a form listbox into a session variable... say there are 4 options from the dropdown like model type area performance and the user selects performance.. I store the string "performance". now how do I place it back into the listbox after the user hits 'submit'? that way the selected values are shown.
Dropdown On Textbox Using ASP
I have seen some techniques like this on the web. Currently, I'm using Combo box which values came from database table. One disadvantage is when the combo box have lots of values, users are complaining since you cannot use keyboard to search the value that is needed.
Autocomplete In Dropdown
I'm trying to put a drop-down box on an asp, which will containing a list of names.When a user starts typing a name that is in the list I want the text to autocomplete e.g. when the user types 'st' I'd like the text to autocomplete to steve or stephen, depending on which is first in the list.
Dropdown List
How to display sql database data to dropdown list in asp?
Dropdown From The Database
It gives me a blank dropdown when there are values in the Currency Table and it also does not display any form element that I place after this code. <select size="1" name="Currency" > <% SQL = "Select CurrSymbol FROM Currency " SET RS = CONN_STRING.Execute(SQL) While NOT RS.EOF%> <option value="<%=RS("CurrSymbol")%>"><%=RS("CurrSymbol")%></option> <% RS.MoveNext WEND Set RS = NOTHING %> </select>
Dropdown Retrieval
i now have my dropdown connected to my database. everytime the user adds a new record, he simply has to choose a Department from the dropdown menu. However, when he tries to edit that record, the value that he has chosen from the dropdown and has been saved to the database cannot be retrieved in the dropdown menu. so i want to retrieve the data from the database INTO THE DROPDOWN so it would be the default value of that dropdown menu when the user edits his specific record.
Dropdown List
I would like to display 15 items (lines) in the dropdown list, but by default the list displays only 11 lines. How can I have all the 15 items displayed in my dropdown list
Format Dropdown Bot
How would I format this dropdown box to uppercase and where would I place the UCase syntax? <SELECT name="txtSearchCity" class="form"> <% Do while not Rs.EOF %> <option value="<%=Rs("Addr City")%>"><%=Rs("Addr City")%> </option><%=Rs("Addr City")%> <% Rs.MoveNext loop %> </SELECT>
DropDown Item
i have two dropdowns(dd1 & dd2) in the same page. dd2 items depends on the item index from dd1.when dd1 is onchange, the form will get the dd1 index value and then do a search in DB for the results to be input into dd2.How can i achieved that?
ASP Dropdown Option Value
Here is my page: <form name=myForm> <select onChange="myForm.forename.value = this.options[this.selectedIndex].value;"> <option value="Arnold">Pam <option value="Mokoena">Joe <option value="Seth">Pat </select> <input type=text name=forename disabled> </form> when inserting on the database,the value of the dropdown option is the same as the value of the textbox which is wrong.they must not have the same values example when Pan is selected,then the value inserted to the database must be "pam" not Arnold.
Dropdown To Execute
what If i wanted to have a dropdown that executed a query based off the selection. so i have a dropdown on page and when they make there selection it queries other data with out submit?
Dynamic Dropdown
I have a table called tblParts. The are 3 fields: PartID, PartNumber and Price. I have a dropdown box on my ASP page that is dynamically populated with PartNumbers from the database. I have a text field for the price. I want it when the user selects a part number from the dropdown to display the correct price in the textbox for that part. I "DO NOT" want the page to reload.
DropDown Menu
I'm using this code to populate a drop down menu and i'm using a query to populate the menu with certain info. from the table column. How could I add other drop down menus to this form and have them filled with different info than in the first drop down menu but still be in the same form? Code:
How To Add Dropdown Response For ASP?
Ok what I did is worked on a model code and put three checkboxes which I would like to enable the dropdow by checking one (or all 3) and disable when none is checked. Just to let you know, I will insert this in a multicheckbox page. I hope there is no confusion with other checkboxes. Code:
How To Build An ASP Dropdown
I want to make a dropdown using a column from my table in the list of the dropdown. What's wrong with this? <form> <select size="1" name="D1"> <option VALUE="0" SELECTED>chapter</option><br> <%Do while not RS.eof ResponseWrite "<option VALUE="" & chapter & "">chapter</option><br>" rs.movenext loop ' Exit the loop when reaching the end of the recordset 'If rs.EOF Then Exit For end if 'next 'end if%> </select></form>
Selecting Dropdown In ASP
My boss wanted me to add a dropdown to this form. I was able to add in the dropdown and it inserts into my database (Access) just fine. However, I have an edit page also and this is where my trouble comes in. On the edit page, the dropdown does not "know" which specific option was selected. I tried to write an If statement but I think there is something wrong in my syntax. Code:
|