I am doing server side asp form validation, the form posts to itself and if all the values are accepted the values are inserted into an access db...
I have several list/menu with static value options.
The problem is when I submit the form and another value is incorrect, each list/menu is reset to the initially selected value as defined in dreamweaver (in my case 'Please Select').
With text inputs I can easily set the value to the value passed through the form, however it's not as simple for a list/menu.
Is it possible to change the 'selected' option based on the variable passed?
It's annoying in the sense that even though the user has selected an option, if they make a mistake elsewhere they always have to reselect their list/menu choice...
how would I go about setting the <selected> attribute of a jump menu to one representing the current page? background info: i have a template-based site employing a jump menu as the navigation, but for usability's sake it needs to not reset back to the first option in the menu, but rather hang on to the current page as the 'selected' option. example of similar HTML showing the hard-coded 'selected' option I need to change: 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 have a list box with a number of values (4) on a ASP form, the value is stored in a database field.
When a form to amend the record is loaded, I would like to display the list box with the currently held value as the seleceted item in the list box. e.g.
4 items in listbox A B C D
B selected and saved.
Amendment form displayed, List box contains A B C D, with B highlighted.
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:
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.
how to show a drop down list with a selected value that is derived from the database? Is this correct? When I do this, it shows "Mastercard" always, even when its "Visa" in the database.
I am creating one web page which contain a drop down list. It use the data from database. Now my problem is when the user select the drop down list value, I want the current selected value update to the database. How to write the code?
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 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.
I need to create a page which updates a products information within a record.
the tables are, products (ID,CatID,sID) supplier (sID,sName), category (CatID, CatName)
The above tables supplier and category have relationships to products by using the sID and CatID
I need to update the product details by having a select/option for a supplier and category but if not changed by the user the value already within products table stays the same, therefore the list must be dynamic so that the first item in the list is the one relating to the value in the products table. Also the value must be the ID numbers but must display the names not the ID's to the users within the select/option.
I have a form page in ASP where the first menu/list function as a filter of the second menu list. Once I select an item form the first combo I get the second menu full of options. This is correct. My probem is that the first combo gets the default value again and I do not see what I did choose.
I'd like to have the option that matches the current value in the database field display as the selected option. I know it's easy enough to manually force one option or another to be selected, but how could I change which one it is based on the database contents?
I could not solve for the past 3 days. I am try to build a website using ASP and VBscript. I am still a newbie to it.Let's get to the problem. What I am trying to do is to have multiple dropdown list. Each list menu ( except the 1st) dependes on the choice made in the one above.
I am using dreamweaver, it did generate a the form and everything and I was able to filter the results. The problem is that I don't know HOW TO REFRESH THE LIST. In other words, I can't figure out how to change the list menu options when the choices above change. I have tried to find some tutorial about it, but all I found was with JavaScript and I don't wanna mix VBS with JS.
Does anyone know how to make it so that when someone clicks on certain menu item on one list it automatically updates a second list with values.For example,if i click the Make of a car in one list, i want the second list to automatically update with the relative Models.
I've seen it done on various sites such as www.autotrader.co.uk but can't think how its done. So far i'm populating the first list dynamically with a database but don't know what the next step is to get the second one to do it.
I currently have an "Add customer" page on my site. On this page you can choose multiple "brands" from a list box. (These brands are dynamic and come from a seperate table in my db). These brands are split up into an array and each added as a row to a database table.
Now I am working on a "Modify customer" page. It has all the same fields as my Add page except that the fields are already filled in with information from the db. I can't seem to figure out how to have my list box have multiple items selected when you first come to the page.
One of my tables is used for two purposes so there are blanks in the column I'm filtering. I tried using an IF statement but it still put the blanks in the list menu. Any idea how to remove the blank items? Code:
I am trying to create a menu for asp.net page. The menu-detail list display, when mouse hovers over the main menu list, like you see in regular windows apps.
When the detail-menu-list window displays, it goes 'behind' combo box (sent to back). For other controls, like textbox, it is fine. Can some explain, how can I send the list box (<asp:listbox>) to become the underneath and not display on top?
I am using asp to submit a form I've created in asp. I was wondering if there was a way to output the vlaues of three listbox menus.
1. User selects hour 2. user selects minute 3. user selects am/pm
This is now outputting into my strBody as seperate entries. I'd like to combine them into one entry within the strBody.
Please reference strStartTime, I've tried to incorporate this into the email strBody, but am unable to accomplish this. Any help would be appreciated. Thanks Everyone!!!
Let's say I have a dynamic list/menu, which gets its values from a database table, for example a list of contact people where the value is an ID number and the label is the name. However, if the value the user wants is not in the list I would like to place a hyperlink which will...
(1) open a small window, with an ASP form to allow the user to add a new entry
(2) save the entry to the database
(3) add that value to the list/menu in the parent window and make it the selected option
(4) close the small window and return to the original window.
I can handle the code for 1,2 and 4, but 3 is what I'm not sure about. I don't like the idea of forcing the user to leave the current screen, go to some other form, add the entry they need to the lookup table, then come back; this seems like a logical approach, but just wondering how to make it work.
This seems like a common enough situation; anyone have any code samples or suggestions about how to do this?
I am trying set up a page where the user can view records chosen by the year. I want to use a dropdown menu/list. Having trouble figuring out the sql behind this.
My db table has about 10 fields in it, one of which is the year this record was created. i want the enduser to be able to enter the page, and first step is to select a year to view. Again, i want this to be chosen using a drop down menu. After clicking I would like the page to show a simple table pulling up all the records from that year.
i know this sounds simple enough, but i cannot find this info/tutorial anywhere.. you guys are my only hope.
who can figure this one out first. I am running windows xp pro, have installed using the add windows componets all the TCP connections and all of the neccessary IIS 6.0 stuff. After doing this, I created some asp test pages with dreamweaver, nd everything worked fine. The server is working and so is asp. Then, I restarted my cpu, and it stopped working. Haven't been able to get it work since. I NEED the server up asap.
So far I have the code below (and a little bit more) to redirect a user to a different page, that works well for just going to one page, but as you can see by choice number 4 , I wish to allow the user to go to two pages, one after the other.
All of the pages that it redirects to have forms on them so the user can enter there information into it. obvoiusly I only want the user going to pages that are appropriate for them. Code:
I noticed when I made a change to my asp pages, the change was not committed. It would commit to the web server so you can see that the page was changed up IE refresh, but not when you post out the file and want to make a change again.
IT would take several minutes before the changes are committed. If you download the file and edit it too soon, then you will see an older page, then posting it back will overwrite the prevoius change!!!!
This is not good for development environemnet where there is heavy coding/changes to the asp pages. We are pulling our hair out and not sure what to do. We are on a shared server and therefore cannot have the hosting company disable the asp caching, is there anything else we can do?
I have one simple piece of code and i keep getting syntax error. Now, i have tried so many things. Moving the speechmarks, trying a different way, but nope same error. The trouble starts when i am trying to add a href to the table. Does someone know where i am going wrong?Code: