In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc.
I'm using
Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM
Parts_Table")
to populate a drop down but would like to use several drop downs restricting the contents of each drop down to the records pertaining to one particular componet type eg a drop down only for type A, only for type B etc.
can this be done if so how?
The other thing I like to do is add the price field to the drop down list (two fields in one drop down) is this done just by seperating the fields by a ","?
The there some way to populate a text field, for modification of a database entry, with black text and then all of the text that the user writes in it is colored red or blue or any other color than black?
I am working on a script in asp (new to asp, 99% php) and I would like to validate the data (no problem) and then repopulate the data in the table that passed validation, spit out error message for bad data, and leave those areas blank, without using javascript.
I had no problem doing this in the past with php (they have more and better array methods in my opinion) but I am struggling with how to do this in asp.
Has someone done this before? If so, could you share the logic on this?
Scenerio: two fields, one validates, one doesn't, show the form with first name given and last name blank while displaying reason for last name error. I understand the scenrio, but I can't make it work in asp???
I have two forms - ie. Rate Request and Booking. I have two databeses. One for rate requests and the other one for bookings.
2)
Upon submiting Rate Request form all customers get their unique quote #.
Question. The booking form has a bunch of different fileds but in essence they are the same as the quote request fileds in respect to the info in both. So to help the customers I want to enable this: upon entering their unique quote # in the Booking form I want the info from their Rate Request to be automatically filled in in the booking form. All infor needs to be in their respective text fields. I know how to populate each singe field, but have no clue how to make this "smart" population.
I have a series of dropdown boxes on my site which are generated from the database which work fine, but when I go to modify the code for list boxes (multiple select), it doesn't work and I can't figure out why it wouldn't work. Code:
I need help on this ASAP. I have to deliver this in another 3 days. There is a ASP page that has 4 text boxes. In the 1st one, I will enter a value. based on this value I enter in the text box, the other 3 text boxes should be filled in automatically. These values for the other 3 text boxes should be retrieved from a SQL Server 200 database based on the value in the 1st text box.
The code that I have has 2 drop down boxes dd1 (visible) and dd2 (hidden). Based on the option selected in dd1, dd2 should be visible and populate options. I think I can have OnChange script but how could I return the value and put it in the SQL query (see variable in red in thecode)? Code:
I have 3 drop down boxes on an asp page Dynamically populated fron the db, I need the drop bown boxes to be refreshed when you have picked the first eg I select "Midlands" from the Region drop down and only the "Locations" that are in the Midlands are entered into the Locations drop down.....
On one of my client's sites, we set up a subdirectory off the app's root directory that doesn't allow the Anonymous IUSR_ account in. When we (the system admins) follow a link to that directory, it presents the standard NT Challenge login screen. We need to know proper Windows credentials to get in -- and once we do, we have access to higher-order functions (to change the read/write bit on files, to delete files, etc. through the web interface). All that works fine.
I'm want to have a drop down box, for which each item in it have its own URL. I want it to be forwarded to the URL only when the button "go!" is pressed. Here is my code, not working
I created a drop down box, I want to do like when a user select one of the options, it automatically run a query and displays the result. I hope there is a way to do this
In one of my ASP pages, I have a Combo box that gets the information from a sql database, the number of records that is shown in the combo box is too much (around 6000 records), the user has to select from these records (let say the user is looking for "George", by clicking "G" the list goes directly to the first records starting with "G", so far everything is ok, now he/she enters "e" (the second letter of "George"),this time the list goes to the first record starting with "e", which is not the way that I want the user to find his/hers record. I hope that I have explained it correctly, what I need is, after entering the second letter of "George", the list moves to the records starts with "Ge", and by entering the third letter, list moves to those records starting with "Geo" and so on.
ive written a piece of code that selects everything from the "Departments" table in a DB and it works well. It lists everything in a drop down box. i'm not writing a page where users can edit their details.
i can make the text in the DB appear at the top, but it's listed again further down. is there any way to get rid of it? Code:
I have made a page in which i have 2 drop down boxes
in first i have got a choice from which i can select subject area eg ( microsoft, cicso , oracle) and after selecting the particular subject area the page reloads and retrive all the courses related to the particular subject area into the other drop down box, and after that when i select the course in the 2nd drop down box and click go then i got the whole information about that course.
Now what i want is that when i select the subject area in the first drop down box, all the courses should come as they are comming now + the 2nd drop down also have the option of "ALL COURSES " and after i select the "All Courses" option and click GO then i get all the courses and details os that subject area. Code:
I have my code like this the user enters the country in Upper case like this for example SPAIN
getcountry=Trim(Request.form("txtcountry"))
Response.write getcountry
now when i do a response.write it types the country name SPAIN
then i have a drop down which is been filled from the table and the values in it are lower case so i have to select spain which appears lower case in drop down Code:
On my page I have 3 drop downs that are populated with static data. When my user makes a selection in either drop down I want to show my HTML table associated with that drop down selection, also the data in my tables are all static.
For example.
if the user selects CAR - New in dropdown 1 I want to show a list of my new cars if the user selects TRUCK in dropdown 2, I want to hide my CARS and show my TRUCK list if the user selects BOATS - Fiberglass in dropdown 3, I want to hide (if shown) CARS, and TRUCKS and show my boat list.
For now all of the data is static (don't ask) so I need to do all of this on the client. Is there a way to do this either using JavaScript, Div tags, CSS, etc.
I have a drop down box which selects an item. I want to execute an SQL query and display the results depending on which item is selected. I need this to happen as soon as the item is selected, ie without clicking any buttons. How do I go about this?
I have a sql query that I wish to use in a drop down box. For instance a user would pull down a drop down box and select their name from the list... that would set the name equal to a variable. I know how to do an input box. and I know how to do the sql query ... but how do I put the query in the dropdown box?
The query is roughly this, assume that I have the syntax corrrect for the query (the exact syntax is at work atm and it is working without the box) . I have done my connect statements and such also.
I want to select a value (that comes from a query) in a drop down list. I have the drop down list working - but when I click the submit button it goes back to the first value instead of keeping the value that was selected in the field. I want to use this value later to select from another query.
I have a combo box that has all the models. I would like to select more than 1 model. Can it be done? Or can i use list box instead of drop down box to do it?
I have a database with fields like; age, hair colour, height, eye colour and more. I wanted to allow a user (on a webpage) to choose from a selection of these catagories, for example age drop down box displays; under 16, 16-21 etc.
The user then selects the one appropriate and when presses a submit button, this is then stored in the database. I want it to be accessible, so the user can edit it if necessary. I realise im going to have to use values in the drop boxes, but am not sure how to approach it.
Can I open and populate a listing.asp page based on a selection in a drop down box? The value in the dropdown box (ie. Wednesday) needs to locate 'Wednesday' in a database field and list all items that contain 'Wednesday' Anybody know of an article or reference where I can learn about this?
I have 2 drop down boxes on my page but I want the option in dropdown box 2 to appear automatically once dropdown box1 has been selected.
With the code I have I can get the single answer in drop down box 2 but it has a blank / select line above it. I only want the one answer and no other option or blank/select line to be available. Code:
I have a dropdown box populated with a list of parents names on a page, and when you select a name, it uses the onChange method to change the names of students in a second dropdown box on the same page (this is done through stored procedures and it does not submit to a new page. this is all done on one page).
My problem is I do not want the student drop down box to appear until after the parents name is selected.
when we select a value from a drop-down box, we no need to press a button to retrieve the value that match with the value selected for another drop-down box.
example:
when we select Fish name, then no need to press a button we can retrieve the fish type that belongs to that particular fish name.
As i know, we need to press a button to pass the value to retrieve the new value from database. when there are few drop-down box that using same method, this will waste a lot of time to retrieve the data. cant it be shown automatically?
Im using a drop down list for user to select their option. (For example the user selected type2) All goes fine for saving, but when I retrieve the info from database to be display on the same form on the same drop down list, it display Select Heretype2
I am facing with a problem of getting Drop Down Values. How do I get Drop Down Values in a array.e.g,
On Submit, I hv to display records based on similar MergeIDs, Like, e.g for MergeID - 1001 i have 2 records in database So I will hv to display those two rows in a concatened form. But these two records hv different IDs.
ASP Display DropDown MergeID Username Task ID 3 1001 Ashish,Kamal Design,Test 21,22 5 1002 Sunil,Anil Data,Design 25,26
Now, when I Select 3 and 5 in drop down,I want that for MergeID it should show DD value as 3 and for MergeID 1002 as 5.I am not getting that.I am able to get IDs 21,22 in an array.
Can someone point to an example where dynamic drop-downs are populated? I would like to execute a sql statment and populate the items in dropdownbox1. I would also like to retrieve all possible values for dropdownbox2 and use Javascript to build an array that holds these values.
Then, I would like to scroll thru the array to select the correct values for dropdownbox2 based in the selection made in dropdownbox1. At last I would like to save the selected values for dropdownbox1 and dropdownbox2 to the database. I would appreciate very much if someone can give me code examples for each of the things listed above.
I'm sure an ASP programmer would be able to create this function within 5 minutes, but I'm just learning and I've fumbled my way through creating a little site content management system for a local community group. I'm a designer and the site looks great (so I'm told) but I just can't get this last page to work. I'm desperate for help!!!
I'm trying to call the values for a drop-down list from a seperate categories table in Access, to add/update records in a main Access table/query. The page/form is used to:
a) diplay/edit existing records; or b) add new (if cstr = "").
I have finally managed to display the correct selection in the drop-down list for existing records (not sure if code is correct?) but I can't work out how to write changes (edit record) back to the database; or 'save' a new record? I'm also not sure if I should be trying to write data to the table or query? Code:
I have a search form with a drop-down box that is populated by several location names. Each location name has a corresponding locatino ID in the ACCESS database. The code looks like this:
<select input name="searchLocation"> <option selected>--Select a Location--</option> <%=TF_GetLocationSELECT(Request.Form("location"))%> </select>
I now want to do a search of an ACCESS file using this box. The relevant search code looks like this:
If Trim(Request.Form("searchlocation")) <> "" Then strSQL = strSQL & " AND location = " & Cint(Request.Form("searchlocation")) End If
Now, if someone selects a location, then EVERYTHING WORKS GREAT! However, if he makes no selection, and leaves the drop-down box with the words "--Select a Location--", then I get an error message saying:
Microsoft VBScript runtime error '800a000d' Type mismatch: 'cInt'
What I want is that when the user doesn't enter a location and leaves the drop-down box with just the words "--Select a Location--" then the search must search of ALL locations. What do I do?