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.
i want to add the deafault "ALL " in the list, how to add? and when i select ALL , it would print out all data in Name field.
<% sVar = Request.QueryString("Name") 'request from Name field If Not Request("Name") = "" Then strSQL = "SELECT Name,TagName,MinTLV FROM Folder where Name='" & sVar &"'" rs.Open strSQL, conn %>
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 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...
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.
How can i list out all the email address into my website from the hotmail caontact list? i am successful log in into the yahoo contact list by using serverxmlhttp and list out all the email address from the page source, but i could not access to hotmail by using the serverxmlhttp. Is any other methos can list out the email address from hotmail contact list?
Drop down value is selected and a query is performed on that value - I want the selected value to stay in the drop down field. Right now it goes back to the first value in the list once the submit button is clicked (it queries correctly).
When I come into the page there should be no value in the drop down list and when a value is selected it should stay in the field.
I have 2 drop down lists here. Supposingly, upon the selection of the 2nd drop down list, I should be able to see textbox entry allowing user to update data being displayed at the bottom. But in my case here, i see no response upon the selection of "selType" which is my second drop down list. But both also don't work. So any suggestion on how can I retrieve the 2nd drop down list' selected value
I have combobox that those value is based on my database. So i want to get the selected value in order to do another matching for the SQL statement. May i know how to get it? Is it just use for example WHERE column=' "&combobox&" '? use the combobox name.
I have an aspx file where i've put a placeholder element. On load i create dynamically a table which contains a checkbox and a radiobuttonlist in each tablerow . The radiobuttonlist contains two items (yes,no). Both the checkboxes and the radiobuttonlist are NOT autopostbacked ( .autopostback = false).
When i press the submit button a sub is run. My problem is that i can not get the selected items in the radiobuttonlists.This is caused cos in the page_load i call the sub that dinamically recreates the table described above and so all values are reset (there is a rdb.item(0).selected=true line in my code.
If i try to remove it, the radiobuttons keep their values or not,after each submit, without a pattern!). I've also tried to keep the values in a collection, instasiated in the page_load but i couldn't do so cos the table (that contains the checkboxes and radiobuttonlists) is not recognized at the beggining of the page_load (i guess it's not an object yet cos the sub that creates all that is at the end of page_load)....
I have a drop down select box that gets filled from database. I have to add "All" to this list which does not come from database. Also the default selected value should be the second value that is stored in array. For ex I have array of Countries names as America, Indonesia,china, Canada. My array gives me the value Myarray(intcount,0)(intcount,1) as America and so on (two dimensional array).
I want Indonesia as the default selected value when the page loads. Also I need to hardcode All at the end. Upn submitting the form the selected value fromthe drop down should get selected.
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.
I have an asp-page where I want the user to make a selection with a listbox. When the user changes to another listboxelement the page gets reloaded and depending on the selection a different content is shown.
I got this working so far but when the page has been reloaded the listbox always displayes the first selection in the list and not the one which the user selected. Code:
I'm using a binary stream to send down a file from the web server. I've been having trouble with IE and getting it to recognize my file. I've added the filename as a paramater(?filename=file.jpgw) to handle IE's mime type mangling, but I'm still having trouble with IE's default Save As Type being HTML. When we send down a jpgw (geo-jpeg) file IE wants to save it as an HTML file. I've got the correct filename showing in the Filename box, and if I choose the All Files option from the Save As Type drop down then the file is saved with the correct extension. I'd like to have the All Files option choosen by default. I know it's just a couple of clicks but we have some noivce users that can't seem to get that
I wrote an application that generates reports.It then presents a page where I click a button [javascript:print()] to open the print page. However, I have a fixed printer and would like to know how to print to the default printer without me clicking anything. So the page will just load up and print. Or when I click a button. I just don't want the select printer screen to pop up. Much similar to clicking the print button on top of the address bar in Internet Explorer.
my new site uses default.asp, instead of using index.asp. this is how my old site was done. now i get error 500. is this because it is trying to find index.asp or because my database isn;t workjing properly? i'm tired and being stupid i think. it's reall probably the database, but i just want to make sure in my sleep deprived state.
I have different templates for different companies to be sent to the customer. first i get all the templates from the DB by giving: Select templates from tempates;
Now i want the user to select one..may be we can have a radio button displayed near the textarea in which i will be displaying the templates from DB. Once the agent selects one of the templates to be sent,that template should be sent as an email to the customer.
How do i go on achieving this ,with good formatted template in the DB?
I have a requirement where I need to have windows authentication enabled for only few ASP pages of my Site (Virtual Directory), rest of the pages should be enabled for anonymous access (No Authentication Dialog). Could some body guide in achieving solution for this.
Flow Steps
1. User visits the home page (One.asp page) No NT authentication dialog should appear.
2. The home page will have some Hyper links to other pages, on clicking on the Hyperlink it should prompt for NT Authentication Dialog (asking windows UserID and Password)
3. Once the UserID is validated by authentication process it should show the Target ASP (Two.asp) Page. The Target Page will have a link Named 'Back' which will redirect the User to 'One.asp'
4.Once user is redirected from Two.asp, if user clicks the Hyper Link it should prompt again for the authentication (Previous login information should be discarded, it should prompt again)
The Challenge i face is 1. Finding a solution to implement authentication for selected pages. 2. Logging off the User so that to Prompt the NT authentication dialog again.
I have a form with some textfields & checkboxes.One of the text field allows the user to select a file.When the user submits a form , I am inserting all textbox and checkbox values in a database.But, while performing insert I also want to upload the selected file on web server.Does any one know how to do that?
I have a Multi select box which I have populated with a list of choices. Is it possible to have a second Multi select box which is initially empty, yet when the user selects values from the first Multi Select box, they appear in the second multi select box? I'm sure I can easily do this by just posting the selection to a new page but I'd like to dynamically display the selected values on the same page.
I have a page that is showing X number of records. I have a column with a check box in front of each record. I would like the user to be able to select certain records by selecting the check box in front of the record and then have the user hit "Submit." They will then be taken to another page in which only the selected records are shown.
I'm having trouble with my SQL statement. I'm not quite sure how to word my SQL statement since I do not have a field in my recordset that points to the value in the checkbox.
In other words, I'm not sure how to carry the value of the checkbox over into my SQL statement when I don't have a field for it. Do I need to add a field, and then update the field on a confirmation page before I use a SQL statement to show me the selected records?