I have JavaScript that populates the lstSelected when items are clicked on from the lstAvailable list box.
When the user presses the Submit button, a 2nd ASP page actually does the insert. My problem is that I do not know how to retrieve the value from the 2nd list box (lstSelected) from the 2nd ASP page. I need to do an insert for each item in the selected list box.
I have tried using Request.Form(“lstSelected”) but that did not work. I also tried a For next loop but I could not get that to work either.
Can someone help me figure out how to loop through all values in the lstSelected list box from the 2nd ASP page?
I have a list in a form where allows multiple selections
<select name="writerID" size="4" multiple > <option value="no" selected> ---- writer ---- </option> <% do until RS.eof %> <option> <%=RS(0)%> </option> <% RS.movenext loop %> </select> How do I make the loop in the add section where I have to retreive the records and add the selections?:
For ?????? RS.AddNew RS("writerID") = request.form("writerID") RS.Update next
I am reading about 200 records from dbf file in ASP code and inserting into a table. I fetch the records in a recordset and in the recordset loop I have to insert it into the SQL table. How should I insert the values? 1) Should I use query in ASP page 2) Or call stored procedure (passing each record parameter) for inserting, 200 times in the loop
I have an ASP page connected to an Access database table. Im wondering of an easy do while loop which will go through each of the records in a specific column and add them up.
Do While Not objRS.EOF
objRS.MoveNext
'Code to add the sum to TotalNumberValue using objRS("NumberValue") recordset
I don't know if this is possible, but I have a Do While Not rs.EOF loop that is pulling values from a SQL database and writes it to an html form. I'm trying to figure out how to tally the values as they are siphoned from the database -- I'm assuming I have to set a unique variable equal to that value as it goes through the loop, but I'm not certain how to pull it off. Code:
I am using a ASP.NET function that returns a table with columns and rows and data (in the cells) taken from my DB (using ado.NET). That function actually returns a set of HTML tags with values, Labels and input boxes. All of that is working fine but now (after the function build that form whith that table) I want the user to fill some of the input boxes located in the last column.
The problem is that i do not know how many input text boxes had been changed by the user (different rows) and i need to manage all the input data of those input boxes.
in VB.NET I can use a loop which goes for each and rvery control and take its text (or value) property.
How can I do that here ?
How can i chack each of the input boxes values using a loop (becuse that input boxes had been filled accourding to a database and in additional the user changed/Add values to some of them ?
for information, to fill the that table i am using a loop that filled the table rows and values accourding to the rows in the DataBase and names of those inputboxes called: "Amount_" & i the "i" is an index which represent the row in the database.
How at the start of script can I dynamically loop through all Request.form variables and use them ? either name or the value, both is the ideal though.
example.
have a form:
2 textfields. named "text1" and "text2"
In asp I need to dynamically grab this data not knowing that this form had the textfields "text1" and "text2".
I am trying to pass a value into the text field on selecting the option in a drop down. The code works if the 'For' loop is not included. What should I do to make it work inside the loop? Code:
I am using list box on one page which has 5-6 values now i want that user should able to select only one value at a time from list box ,now after selecting value when he click submit button it should direct it another asp page which also has a list box and that list box should have all values which was on previous list box on first page , i m using post method.
user only able to select single value from list box on first page but second page should display all vaues in list box.
I have multiple list box added to the asp page using <select> tag. I have added items in the list box using recrdset from Education table Education table={educationid, educationname}
User can choose more than items from the list box. These items gets added in the user table in field "edu" seprated by commas. When User wants to edit his information ...i want that the items in the list box should be automatically selected which are present in "edu" field.
I have a list box with five values in it. These are essentially account groups. The user will select one of these values and click on a button. This will update a second list with specific account names depending on what the user selected on the first list.
These account names will be retrieved from an SQL database. Below is the code which sets up the first list and the button. Code:
I know how to write cookies and how to call cookies. But how do I write the values of a drop down list and the value of a radio button list to a cookie and call them to select the correct options when the page is reloaded?
I am trying to learn and use good DHTML concepts and code (assuming they are needed). My current issue concerns how to handle this situation.
I have a Select List box which displays values based on what value is selected in a dropdown list. For example, my dropdown list contains a class name, and the Select list contains all of the students who are registered for that class.
So what I would like to occur, is when the user changes the class from the dropdown box, the Select List is re-created displaying the students who are enrolled in that class.
I thought I could do this without having to reload the page (with DHTML) but here is my problem. Code:
I have a recordset that I loop through all of the data within a table, within the same loop, I am trying to add another loops that pulls information from the first recordset to base the second recordset off of: Code:
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?
I want to call a recordset so you can edit the details and then obviously pass the parameters onwards into the db. However, the user guide just says this:
To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include: Code:
select case code case "01" ups_desc = "OPTION1." case "02" ups_desc = "OPTION2." case "03" ups_desc = "OPTION3" case "07" ups_desc = "OPTION4" case "08" ups_desc = "OPTION5 " case "11" ups_desc = "OPTION6" case "12" ups_desc = "OPTION7" end select
I then have table called "users" which has the following id UserID Code
now the trick
I want to loop through the recordset of the user tables and populate a drop down where the code from the case and the user table are the same.
Something like
do while rs("code") = code <option> This then is populated based upon the loop(I have this code)</option> loop
i have 2 tables (A & B) with date records now i loop table A and then table B, the output will be table A in the front and table B in the back.how can i make the output show by date in both tables altogether? do i need to combine tables before but the number of records is over 100K which may spend a lot of processing power?
on my classifieds site i would like to create a simple ads system. i currently have the ads site made but need some advice.
on my classifieds site i would like to display the ads down the left hand side.
however i dont want to over display ads.
if there is not many items listed i only want a small amount of adverts shown on the left hand side. however if there is lots listed i would like quite a few adverts listed.
otherwise i would have a big list of adverts and only a small number of items listed making a big blank space on my page.
i am guessing this would have to be a loop or something.
the code i am using to show the text links is <%=adurl%>
I am using a for loop in one of my asp page. Could someone let me know if I can do the for loop as follow:
[code]<% for i = 1 to 5 %> my html code my html code my html code <% Next i %> instead of [code]<% for i = 1 to 5 Response.Write "<input name = 'id'"&i&" type='text' value = "&id& ">" Next i %>
im writing some script to add records to my db. but if a value thats about to be added exists, then dont add that record.for example: if i want to add 7 records to my db with the values 1 - 7, but the db already has 3, 5 and 7, then it should only add 4 new records (1, 2, 4 and 6).
i have a record returning all records form my db, and an array with the values i want to add. i want to loop through my recordset of all existing entries, then for each loop, start another loop to see if the value exists, and if it doesnt , then add a new record.
How to use the for loop or do while loop to create the age range from 10 -100 to let the user to select from the form object - list/menu by using asp? The coding below is just a concept. For example
Response.Write("<select name=""select"">")
for (a=0; a<101; a++) ( Response.Write("<option value=""" & age & """>" & age & "</option>") )
I'm trying to create a page where images are displayed based on an id in a sql table (basically its an unlit candle until a value in the id field exists). I'm not getting an error with my code below - but its not working right either. Code:
<% If rs("my_id")="2" Then Response.Write "<img src=""images/07.jpg"" width=""56"" height=""97"" alt="lit candle">"Else Response.Write "<img src=""images/UNLIT_07.jpg"" width=""56"" height=""97"" alt=""unlit candle"">" End If %> ...
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]Numeric value out of range (null) /database/data_entry.asp, line 90
Line 90 is shown below...
// count the total records by iterating through the recordset for (rsProducts_total=0; !rsProducts.EOF; rsProducts.MoveNext()) { <---- Line 90 rsProducts_total++; }
This is an access database, connected to via a DSN. Any help will be muchly appreciated! I'm stuck on this one.
I'm using three loops on a page and would like to set the loops individually to start at either 0 or -1 based on a condition. As an example, I would want the loop to start at either -1 as shown or 0.