Display Drop Down Options Based On The Selected Item From Another Drop Down
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:
Problem is when there is an error with one of the other fields and the press reloads the county is reset to Select County how can i remember this value.
I am having a drop down list and other text boxes in a form. I need to retrive and fill text boxes from database depending on the selected item in drop down list. I am using javascript as scripting language. Can any body give solution.
The default drop-down value is populated by a value already selected using Recordset.
The problem is on the Edit page, the user should have the ability to change the drop-down value, but because the default value is one that has previosuly been selected, it appears twice in the list.
Because I already have an "If, Else" statement to disable some fields, it is causing confusion when I try to enter further If/Else statements to narrow down the drop-down list. Code:
I am trying to set up a component that will allow events that are date sensitive. From this date to that date. What I am trying to do is use drop down menus for selecting the dates, and I am having a hard time finding out how to build these drop downs so when someone is editing an event, the existing dates are pre-selected in the drop downs. But I need to seperate year, month and day for both and then have it change the value of the correct option to selected.What is the easiest way to do this?
Below is an extract from a form that i am writing. I need the user to be able to have a drop down menu of languages. How do I use the 'option value' command in ASP like you can do in HTML; so there is a list of languages for one to be selected. If someone could amend my code to give me a couple of language options so I can get an idea of how it is down.
I have a dropdown menu with parents' names, and on the same page when a name is selected (through an onChange event), another drop dpwn boix containing student names change according to the parent selected.
But I want the Parent drop down box to contain the parent's name who was selected, and although the event works, it just keeps displaying the first name of the list of parents even after a different parent is selected.
I am trying to find out how to select an item from a drop down menu after a query is executed. My drop down has 4 options, and what I am trying to do is if the record stored in the database is "option2" I need the drop down menu to have option2 is selected.
I have a simple form on my site with a drop down list for users to search for a specific category. The search works fine and populates my results page with the correct responses.
Alongside the results I have included the search form again so that users can modify their search, however I am unable to pre-populate the drop down menu with the previously selected category.
I have tried an IF statement but this only works when I hard code the variables in. Please can you cast your expert eyes over my code, I have a feeling I am suffering from fatigue as I have been trying to solve this for some time now. Code:
I have page 1, that has a drop down box with codes. The user could either select a code or click a link that opens a page with a drop down consisting of descriptions.this is what I am trying to do.When user selects an option in page 2 drop down, the page 2 should be closed and the selected value should be inserted in page 1 drop down. How could I do this in asp?
What is the way to make an option in a drop down box selected if dependant upon a variable.eg have list of states and once a customer has been selected the state reflects the customers state in say an edit customer form.
I cannot get the selected option to be POSTed (it does not appear in the QueryString when using GET neither)
I construct the drop down list from an array, I select an element in the list, I POST using a submit button. When I use Request.Form("NAME") it's always empty. Is the selected item is Posted? How to retreive it?
Response.Write "<SELECT NAME>" for i = LBound(aRessource, 1) to UBound(aRessource, 1) Response.Write "<OPTION VALUE=" & i & ">" Response.Write aRessource(i, 0) next Response.Write "<OPTION SELECTED>" Response.Write "</SELECT>"
I am working on a small application for senior users, so I want to limit the option for incorrect input whatsoever. I have a drop down box that is populated from a query and I want to make it so that when an option is selected, the pertinent text fields are populated based on the selection.
All the info I need is already being extracted from the query so its just a matter of displaying the right info based on the selection. I have been looking for examples of code but they all seem to use javascript. I am not too strong in javascript so I kinda avoided those. if there is a pure asp example, that would be fine!
i have a page which displays a list of events searched for by a particular date. we usually have a lot of events and i don't want the user to have scroll through all of them, especially if they're interested in a particular type of event.
i have created a dynamic drop down menu which consists of all the event types. how can i got about displaying the events returned by the query to a specific event for that date.
so for example, if some one searches for 03/08/2005, they will initially get a list of all events for that day. if they click on "Closed" from the drop down menu, it will display all the "Closed" events for 03/08/2005.
I'm making a selection from a drop-down list that had an ID number as the value and displays a text field. After submitting the data to the database I am sending an email and would like to include the value displayed in the DD box, not the hidden value. How so I reference that displayed value?
I want to use the number for the database but display the words in the confirmation email. Is thsi possible without making another roundtrip to the database?
I've got this listbox and this text field on an ASP page. Now I want the item I click on in the listbox to appear in the text field and I can't find the code nowhere for what seems to me such an easy thing to do.
Just getting started with ASP (NOT .NET) and have a question:
I have a basic form and I'm trying to add some functionality to it. I want a user to be able to select a product from a list box. After this product is selected have another text box, ProductID update to reflect the product number.
In VB I would use an OnChange type thing. Can anyone point me how to do this with an ASP page or using some kind of embedded script?
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects?
For example:
User selects "name" in a select statement which would list the possible names to select from or if the user selects "telephone" in the same select statement then it would list the possible telephone numbers to select from.
Or simpler:
If user selects A then show P to select from or if user selects B then show Z to select from.
What I want to do is have a recordset with all records in and display a list by title with a tick box next to them, then goto a new page which the recordset is all the records that the user selected on the previous page.
I've got a directory site for accommodation providers. I would like them to have the ability to display a couple of images on their details page. I can easily set it up so they upload images to my server and DB and are displayed etc etc... But I would rather have them just provide the links so that the pictures remain on their website etc....
The only issue I have is what happens if it is a bad link. By uploading to my server I can remove the risk of images not appearing, but by using a link, is there a way of 'testing' whether there is an image at the end of the link. Is there a script out there capable of verifying if an image file is where it should be for veiwing? My initial thought was to have a script that tests the image link for a width <> 0. On the page I would use an IF statement to allow displaying of the image if the image existed..... BUT HOW ?
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.....
Is there a way to display a Secure / Non-secure item from a ASp web page.Does anyone have any idea what i could type in in the URl or anywhere in the page to break it.
I am creating a form with checkboxes that contains in the value property, the ID of the image. The filename of the image displayed above the checkbox along with the image.
On that page, I am storing the "checked" information in a cookie. When the user clicks submit, I need to retrieve the actual image that they selected on the previous page and display it along with the image name which I get from the value property.
Right now the only data being passed is the value in the checkbox input tage which is a text string and not the actual image. How do I retrieve the images my users checks off. I hope this make sense. Sort of like a shopping cart, but I only want to be able to select images and post back the ones selected.
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: