Freeaspupload: Retrieving Multiple Values From A Select Field
I'm having problems retrieving all the values from a multiple selection field using the freeaspupload component.
I'm creating an online email app that uses the freeaspupload to add attachement functionality, which means the form encoding type is multipart/form-data. I've done something similar with the persits aspupload component, and had no problems with that, but the freeaspupload version seems to handle <select> fields slightly differently. Code:
I have a difficult technical challenge I'm facing. I need to retrieve multiple values for the very bottom item in the list, 'Federated' (ignore the rest).
The database will query based off the option 'value', however, in this special case I want to perform a retrieval based off of multiple of values. I want to try to use the existing code without reinventing the wheel. Code:
I loop through a recordset to return values that populate a form which the user can then edit and save. However these fields need to be validated first to make sure the data entered is correct. I have a Firstname field that returns 3 records from my recordset which means when I try to validate, I get an error as the page doesn't know which of the 3 to use. I believe I have to do it through an array, but have no clue how as my efforts have failed
i want some help in how to retrieve values from multiple selection listbox. i want the values retrived to be used in the search which i perform from the database. i m doing a search feature which u all often see in job search sites. so someone selects multiple cities to search in i want that to include that in my search query.
I have a form that send values to a second page. i m trying to compare the values received from the form with other values retrieved from a database. so if a value already exists then an error message is displayed. in order to compare the values i need to print them on the second page but I m bit stuck with this. i used request.form("category") in order to retrieve the values from the form but it doesn t work.
I am having a form and I want to retrieve the values of the form fields. (using ASP & VBScript)I could retrieve the value of text box, etc, but having a problem when i try to retriee the selected value in a combo box. My code:
I am having a slight problem. I have an asp page called custfeedback.asp. This page contains fields where the customer fills in name, email address comments etc. The form gets submitted to feedback_complete.asp, where a message is displayed thanking the user.
My problem is that the variables in custfeedback.asp are not "retaining" their values when the user is redirected to the feedback_complete.asp page. I know the asp is working, because I have the following line in that displays correctly:
<% Response.Write (now()) %>
I have no idea why the variables aren't retaining their values. Does any one perhaps have any idea how or why this is happening, and how to resolve this problem?
i am creating an website using asp. In one page i am using dropdown combo box having multiple property true, so that user can select more than one values from dropdown box. when i am submitting form in querystring it gives dropdown box & the value of selected option. Code:
I'm trying to retrieve 2 values from a table (product stocknumber & description) that match a form result (product ID number) to send with the "form results email". Not quite sure how to do this. Code:
I have 3 text fields in an Access db with each some default values.
I have an edit page where user's can edit those fields. The problem am having is if for instance I empty the field in the edition page, since am not allowing null or empty in them, when I save of course I receive an error telling me that this field is not allowing empty value.
Now what I would like to be able to do is this, when I save I'll check If the request.form("thefield") is empty, if so then instead of saving the empty value I want to return to the default value set in the db.
In my Access database I have multiple images for some of the records. What is the best way to retrieve and display the multiple images. I am storing the images in a folder and only the path in the DB.
Some of them have just 1 image, some 2, some 3 and so on. I have the record ID # and the image name same, for eg. if the record id is R01 then the image name would be R01.jpg if there is only 1 image otherwise R01a.jpg, R01b.jpg, R01c.jpg etc. Is there any way I can open the folder and check for the name and list the image file names as a link to display the images if the ID name and image name matches.
I am currently validating a form using javascript. This checks empty fields and that email is correct. Do I also need to do these checks server side? Does anyone have a good link to info on server side validation ie. empty fields, data type, email a valid email etc?
I have a database with many tables. I have many objects on my form, textboxes, checkboxes etc... I need to populate a second drop down box after selecting the first drop down box with out the user clicking a button, Yes Master I know how to do the JavaScript onchange but every thin I have looked at uses hard coded data in their example. Can you give me a form example using you tutorial DB of multiple DD Boxes.
I am trying to search for clients contained within a database using multiple search criteria that the user is able to select using a front end form.
The user is able to select there criteria by selecting one or more check boxes and the results are thus retrieved based on what the user has selected. The search works fine until you try and select multiple client types Code:
I have this SELECT box which allows users to select multiple items to delete... however if they select 2 or more items... the values get passed over as 'one, two'
So the sql looks like Delete From Table Where Field='one, two';
How do i do it in such a way that it becomes:
Delete From Table Where Field='one'; Delete From Table Where Field='two';?
I am creating an application in ASP (old school ASP not .NET) and VBSCRIPT connecting to a SQL Server 2000 back end. There is a form on my webpage that has a select box in which <option> tags allow users choose a document type.
Once the document type is determined it is sent off as a parameter in a stored procedure on the databse. The recordset returned holds the values that are required to go in another set of options boxes.
(the next set of option box values depend on the query results). I know it sounds easy...I mean I know how to do it if it where on 2 seperate pages (thats easy) where it passes on the info...but this is for ONE asp page.
I'm having trouble getting a certain value out of my database. Code:
reportID = Request("reportID") sql = "SELECT * FROM reports WHERE reportID =" & reportID set rs=Server.CreateObject("ADODB.recordset") set rs=conn.execute(sql)
I can get every value I want out except for one, rs("courses"), which is a text field that is filled from a multiple select form that enters the ID numbers of courses. The thing is, when I check the actual Access db file, I can see the value there (e.g: 1, 2, 3), but when I try to print it to my page (e.g: <% = rs("courses") %>),
I get nothing. I can't figure out why it won't work especially as I have an identical field in another table which I can get the value for using exactly the same method. Anyone have any idea what could possibly going wrong?
I first retrieve the values stored in a session variable (where I have stored an array). Then I assign the session variable to a local array called "myarray".
Assume that "myarray" now contains 5 records. What would the code look like if I want to create a loop that transfers the 5 values from "myarray" into a select box/dropdown list?
I have an interesting situation that needs to be addressed ASAP.
I am running a standard SQL Query in ASP to retrieve some rows/columns from a table that's on a SQL Server 2000 database. I put the results of that query into a RecordSet, and then use the GetRows function to push the results that are in the recordset into an array variable. In the query that I am running, 39 columns and 2 rows are returned.
The GetRows function appears to be working - the array variable is being created with the proper dimensions. However, the values of the different "cells" of the array are not showing up correctly. The first and the last column values for each row are correct, yet everything else in between is blank, empty, NULL, or whatever.
In other words: ArrayVariable(0,0) shows up correctly, ArrayVariable(38,0) shows up correctly, but everything in between is null.
I did a test on the RecordSet and discovered that it was the culprit - it wasn't being filled in properly. This is strange, though, because the select query that I run in the ASP code to create the recordset returns perfect results when I run it on the SQL Server 2K database.
I've got a database that has 5 numeric values for each record. I'm trying to figure out how to have the records sorted alphabetically, but highlight the highest value in the table for each column. So in other words, the table shows up with one record in each row, with a total of 6 columns (the name plus 5 columns). I want the highest value in each column to be emphasized.
So the final product would end up looking like the code at the bottom of this message.
I've pulled the records from the Access database and am able to sort them alphabetically and get the table to appear. What I was thinking is that at the top I'd define variables that correspond to the highest record for each column. Then in the table code I'd set the colour of each cell using an 'if then'.
So I have 3 specific questions:
- Is that the best way to do it? I don't want the page to take 20 minutes to load because I'm overloading the server.
- how would you set the variables at the top of the page?
- how would you write the if then in the middle of the table to change the background colour of the cell if that value (or values, in case there's a tie) is the highest of all the records? Code:
I have a fairly simple problem that I can't find a straightforward solution to. It is a form which is checked server side using ASP to make sure certain fields are valid and then re-outputs the form if it fails with the fields already filled in, including multiple select boxes. The solution using PHP would be: Code:
Is it possible to query a database base on 2 distinct fields
I have tried this, but it did not work My Query:
SELECT DISTINCT rDateTime, DISTINCT rSessionID FROM TBL_RESPONSES WHERE rsID=" & iSID & " AND ruID=" & iUID
the error i got is: Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'DISTINCT'.
Currently I have a combo box that shows records from a Select query using Group By. So it only shows each record type once. I can currently search for records using the combo box but I want to search for multiple records in the combo box.
For example, if in the combo box it shows records: Adam, Bob, Carl,,,etc.. Right now if I click on Adam, the search will bring up all of the Adams. What I want to be able to do is to be able to click on multiple records such as Adam and Carl and have all of the Adam and Carls show up.
I use a multiple select in a form in an asp page. When I go to the target page, I want to be able to read out the items selected on the previous page. How can I do that?
I use a multi-select menu in an ASP so the user can pick several values.
<select multiple name="lbErrorType" size="12">
However, after I have saved the records to the DB, and the user comes back to edit a prior record, I re-populate the multiple select box and do a "<option selected>" for each record that is saved to the DB.
<option selected>
But only the last value is selected !?!?
How do I get the select menu to select ALL the appropriate values ?
My users have to select an value from a fixed selection of values. The obvious choice of control for such a requirement is to use a <select> (i.e. a combo box).
My problem is that sometimes, these combo boxes will have a *large* number of values. There could be any number of values in them from 5 to 5 million (unlikely it would be this large but possible).
Obviously 5 million is far too much to populate a <select> control with. Does anyone have any suggestion as to how a user could select a value from a *potentially* very large selection of values (i.e a suitable alternative to the <select> control)?
Say I have a field containig some text, for example: The quick brown fox jumped over the fence. How do I only show the first 4 words of the sentance, i.e: The quick brown fox...
I have an ASP admin script where I'm adding records, and I have a category that already has set name values hard-coded into a selct option pulldown, but if the user wants to create a new category and not use the select pulldown, the value will end up being " , newvalue" when posting from this sequence of pulldown and input text box: