Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Loop Through Textboxes

Ho can i loop through textboxes and then collect the data filled into them.I've done one for checkboxes but can't get my head around doing the one for textboxes.

View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
I have two textboxes, nett, vat and gross value.Nett and vat are entered manually, is there a way to say, when nett textbox lostfocus or vat lostfocus then add the two and show the value in the gross value textbox WITHOUT calling the page again as i would have to do in vbscript?

View Replies !   View Related
Displaying 2DP In Textboxes
When I retrieve this data into standard text boxes (using ASP/ADO) so that
the user can update/file the following problems occur on what I would call
price fields:

10 << I want 10.00

11.6 << I want 11.60

12.89 << this is fine

My MySQL DB holds prices as decimal(10,3) so I know the decimal data isn't
chopped at this point.

Before the data is displayed in these boxes I created the below function to
parse the data before it is written to the boxes: Code:

View Replies !   View Related
Query AND/OR For Textboxes
I have 6 textboxes where if I fill them up I want the query to search if either one of them has results found. I have this but it's not working:

SQL = SQL & "text_data LIKE '%" & Keyword & "%' OR "
SQL = SQL & "text_data LIKE '%" & Keywordb & "%' OR "
SQL = SQL & "text_data LIKE '%" & Keywordc & "%' OR "
SQL = SQL & "text_data LIKE '%" & Keywordd & "%' OR "
SQL = SQL & "text_data LIKE '%" & Keyworde & "%' OR "
SQL = SQL & "text_data LIKE '%" & Keywordf & "%' AND "
SQL = SQL & "book_spoke = '" & spoke_number & "'"

iCounter = iCounter + 1

(I would like to know the use of the iCounter since I use it from other examples but don't know why it's there.)

I've tried this too but this gives every record within
"book_spoke = '" & spoke_number & "'"


View Replies !   View Related
Textboxes Are Yellow
All of a sudden about 50% of my textboxes are yellow (as opposed to theusual white color). It started when I started on an ASP project, but this could have been coincidental. I have noticed that it shows yellow textboxes on many other webpages.

View Replies !   View Related
Disabled Textboxes
The input forms are created using FORMMANGER of MS Visual Interdev 6.0(ASP Code). The forms containing textboxes and bottons (with disable property) are shown correctly in IE5. But when same forms are viewed in IE6 the disabled textboxes and buttons are shown distorted.

View Replies !   View Related
Insert Textboxes In The Form
Someone have a script to insert dynamic items in the form?
For example...

In my default form have 5 textboxes... I need to put a button to users to "add new item"... and add textboxes to the form.

View Replies !   View Related
Posting Values From Sp In Textboxes...
i need to get the values from the stored procedure below, basically the Name, Description, and is Active values and display them in two textboxes and a checkbox. How can i do this? Or can it be done with this stored procedure? I havent been able to find any good examples on the web... Code:

View Replies !   View Related
Excel Cells To Form Textboxes
if i have an standard excel file and i have data in there in specific cells. Is it possible to have some upload facility that will be able to paste it to specific asp form textboxes?

e.g if the data in the excel file was in cell c4, i would want to paste it into textbox4. Is that possible.


Is it possible to upload an excel file and to put specifc data from different cells directly into an access database.

e.g excel file -c4 i would want to paste it to rs("test4")

View Replies !   View Related
Multiple Radio Buttons/textboxes – Inserting Into The SQL DB?
I’ve a few radio buttons; few of them have input textboxes and dropdown list.
I use Select case to insert values (depend on which radio button that you've selected) into the sql db but it doesn’t work. Then I use if, elseif and else…the value of radio still doesn’t insert into the DB. In this case how can we insert the value(s) into the DB? Code:

View Replies !   View Related
Need To Perform Form Validation For Negative Numbers And Letters In Textboxes
I have two URLs. Static.htm and dynamic.asp

Contains a form with two text boxes, called text_1 and text_2 and some other info that is irrelevant for my question.

Need some code to check that the text boxes only contain values greater than 0 and only numbers. Thus if any of the textboxes for example contain -3 or the letter m I want to cancel the form submission and display some kind of error message.

How can I achieve that?

View Replies !   View Related
Parameter Not Passed From For Loop To While Loop
I'm trying to pass a parameter from a for loop to the nested while loop
but only the first counter is passed. Here is the code:

View Replies !   View Related
Nesting One Loop Within Another, Using 1st Loop As Criteria For 2nd
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:

View Replies !   View Related
Do While Loop?
I have a case statment like

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

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>

View Replies !   View Related
Do While Loop
I need to insert recordes into a db based upon a number returned in a form
Somerthing like

AddRecords = Request.Form("NumberOfRecords")

Count = 0

if Count < AddRecords Then
Do while Count.eof

SQL Code....

Count = Count + 1

Count.move next
End If

View Replies !   View Related
How To 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 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?

View Replies !   View Related
Asp Loop
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%>

View Replies !   View Related
For Loop
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
for i = 1 to 5
Response.Write "<input name = 'id'"&i&" type='text' value = "&id& ">"
Next i

View Replies !   View Related
More Than 1 Do Loop
I am using ASP and need a DO LOOP to get some info back from the db. but the asp reads the first do loop but does not read the second one ......

View Replies !   View Related
While Loop
is there any function or statements that work the same as the 'break' statement in C++ language?

for example:

While Not rs.EOF
If rs("LoginID") = userId Then
break 'what shd i use for ASP???


View Replies !   View Related
Loop Within A Loop
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.

View Replies !   View Related
For Loop Or Do While Loop
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>")


View Replies !   View Related
If Then Else Loop
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 %> ...

View Replies !   View Related
Sub And For Next Loop
I have a SUB which has input variables. If I run it once its okay, but I need to include it in a loop. Can this be done ?

for i=0 to 100
call mySub(arr(0,i))

sub mySub(var)
end sub

View Replies !   View Related
RS Loop
I am getting this error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]Numeric value out of range
/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

This is an access database, connected to via a DSN. Any help will be muchly appreciated! I'm stuck on this one.

View Replies !   View Related
For Next Loop
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.

Dim r
For r = --1 to Session("TotalRowsF")



Or, based on the condition it could be

Dim r
For r = 0 to Session("TotalRowsF")



View Replies !   View Related
ASP Loop
I can display some text 5 times using a loop and i want to pass those printed
values to another page when i clicked send button.

View Replies !   View Related
Loop D Loop
I'm trying to give the variable sStart a new name on each loo

sStart1 = value1
sStart2 = value

however the following piece of code doesn't work

set oNodes=xml.selectNodes("/Project/Tasks/Task/Start"
for each oNode in oNode
for i=0 to 10

View Replies !   View Related
Next Or Loop?
I've been coding now for around 3 years. A year ago, I inherited a forum from a friend who didn't have the time to run it anymore. It's an old, very old, version of the WebWiz template, much modified. So modified in fact that upgrading to a newer version is impracticle, the best I can do is add features that you'd expect a forum to have these days. Code:

View Replies !   View Related
Do While Loop / ASP
Here's my problem (aside from the fact that I'm a newbie.) I'm using ASP to call an Access database with four separate tables. The first three are working perfectly. The fourth is a little more tricky. I'm pulling the information based on a registration number (entered via a form). In the fourth table, each registration number is listed multiple times with production information for each year and quarter. For example:

(reg number, year, quarter, # lbs, amount)
A008374 - 2001 - Q1 - 840 - 232
A008374 - 2001 - Q2 - 520 - 164
A008374 - 2001 - Q3 - 8256 - 3368

I want to use a Do While...Loop (print the information while the registration # is equal to the one entered) to print out the information for each entry. Code:

View Replies !   View Related
what's causing the error "loop without do"? whenever i put a do in it keeps coming up with more errors. Code:

<table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#E8E8E8">
<%Do Until RS1.EOF%>
<td align="center" width="25%"><font face="Trebuchet MS" size=2 color=<%IF RS1("Status") = "Booked" THEN%>FF0000<%ELSE%><%END IF%>><%IF
RS1("B.Room") = "Booked" THEN%><a href=blah><%=RS1("B.Room")%></a></td>

View Replies !   View Related
For Each Loop
I have a form with a select object ("Select") that will allow me to select multiple values. I put the following code in my asp file to display the values:

for each Item in request.form("Select")
vValue = request.form("Select(Item)")
response.write(vValue & "<br />")

The above code produces only multiple blank lines for the selections.

View Replies !   View Related
I'm trying to perform a loop to display the contents of my DB, the only issue is that I would only like to display 10 results maximum this is relatively easy but what happens if there are less than 10 results in the DB. If I was going to do a :

Do Until objRS.EOF

Then it would display the full records, likewise if i put a counter on the loop then it will run into errors if I have less records than the count.

View Replies !   View Related
Do Next And Loop
Im trying to sort out what should be a very easy task, but I'm having a blank spot. Im pulling a distinct letter out of a DB and i want to be able to sort it A-Z inclusive using next and/or loop. then use them as a navigation aid.

View Replies !   View Related
For Loop?
I am trying to do a loop based apon the number input into the form. Each "Section" should output some HTML code (in echo'd format).

If you select 0 sections, the header and footer are generated, but no section, if you select 4 sections, the header and footer are generated, with 4 sections. Here's the code:

View Replies !   View Related
Comparison Using Loop
I am doing a scheduling system. The concept i have but i am weak in my programming, therefore i hope that u all can help me on this.

i have a capacity (uph x shift x 7.17) and orderperday (total orderqty per month / total shift per month)

the thing that i am not sure in is, i want to do a comparison it is becoz there is a capacity limit per day. i cannot afford 2 produce overlimit. so if the orderperday > capacity then orderperday - capacity = balance. balance will be bring forward to the next day to produce. then the comparison will be done again. i am not certain on how to do the looping in this context.

View Replies !   View Related
Problem With 'For' Loop
I am running a for loop but i dont know how many time i will need it to loop and the data may vary, is it VITAL that the syntax is For x = 0 to 5 or is there a way of stating to complete the action until the end of the table. I was thinking of using the EOF function but i am using a variable x to group the data together in the table so it doesnt go all muddled up.

Any suggestions?

View Replies !   View Related
Jmail Loop
I am some what new to asp and programing. I have put together this code, so I can send out a mailing list to some users. The code looks and seams to run fine. But I dont receive any test messages during when I execute it. it's like the SMTP sever is not sending the emails....

View Replies !   View Related
For Each Loop Problem?
I am facing a problem in For each loop. I am getting values of the selected records from a form and trying to add it the database.


for each CustomerId in Request.form("CustomerId")

SqlStr="Update Customer set CardStatus= '"& CardSt & "' where Customer_id= "& CustomerId & " "

cn.Execute SqlStr

For example I am trying to update 5 records out of 20.

The customerIds are selected as check boxes from previous page. The cardstatus are drop down menus. So if i select 5 customerId check boxes out of 20 records, there will be 5 customerIds coming to this page and all the cartstatus values. The cardstatus values has no reference to the CustomerIds.

View Replies !   View Related
Do Until Loop Problem
I am trying to display records from a recordset after sql statement:

<% sqlstr ="SELECT horsename FROM tblhorseentry WHERE trackname = '" &
request.querystring("trackname") & "' and racedate = '" &

Set rs1 = Server.CreateObject("ADODB.Recordset")

rs1.Open sqlstr,pConn,3

do until rs1.eof

response.write left(rs1("horsename"),14)

rno = rno + 1
rtg = rtg + 1

set rs1 = nothing
loop %>

...but when I test the querystring link going into the page with the asp
scripting, I do not see my horsename(s) display; it just echoes a blank

View Replies !   View Related
Loop Though Session
Is there a way I can loop through everything that is in session?

View Replies !   View Related
Time Loop
I am trying to get an asp working which will loop every 30 minutes. Then take a copy of one file from one server and place the date/time now() in front of the file before writing it to another.I tried it on my laptop at work just by checking if the file exsits but seem to have trouble encoding with unc paths.
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If (fs.FileExists("viper3 vdatainfosystv2502vinfotv32.exe"))=true Then
Response.Write("The system is offline for essential data load")
Response.Write("File exists.")
End If

set fs=nothing

View Replies !   View Related
Loop Through Recordset
Is it possible to loop through recordsets using javascript? If possible, can show me an example.

View Replies !   View Related
Loop Executes
Is there a way to count the number of times a while/wend loop executes. I'm using a while loop to display database records on a page, and I need to get a count of exactly how many loops occurred in a variable for use in a function.

View Replies !   View Related
Loop Problem
I am trying to write to a text file in asp. I have created the following bit of code but it keeps coming up with a syntax error.


dim myFile, i

myFile.WriteLine (For i = 1 to 3 Request.Form("inst_time" &i).Item) Next)

I know it doesn't like the for loop in there but I dont know what it should be formatted like?

View Replies !   View Related
Loop In Array?
I have some arrays multiples arrays
(,1,2,3,4,5,6,9) and (lucas, john,nathan,mary,..)

I was trying to have a output like a list
ID Name
1 mary
2 John
.. ..

However how can i do this? I tried "for each" loop but it repeats one field twice

View Replies !   View Related
For Loop Bad Syntax
The folder_num variable returns the number of folders from another page. Next I have a loop that will declare an individual variable for each folder name. However, it does not work...

folder_num = request.querystring("fnum")

for i = 1 to folder_num

fldrname(i) = request.querystring("fldr(i)")


View Replies !   View Related
I am processing the variables from a form submission with a for/next loop. The problem is that the order of the variables are NOT written IN ORDER.

Form field 1 prints fine but then it jumps to Form field 9 and then back to Form field 4 then to Form field 2, etc. IS there a way to process the form variables in a loop in ORDER? field 1, field 2, field 3, etc? Code:

View Replies !   View Related
Loop And Array
I need some help with a calendar loop. the calendar works fine, i just need to compare the CurrentDay in the calendar to my records. connect to db and pull records into an array. ASP Code:

View Replies !   View Related
Indentation In A Loop
How can do a loop using ASP code to iterate to the highest value in the Indentation column so that for every increase in the indent value of the SQL, I indent the value by a certain space? My code is: Code: .......

View Replies !   View Related
Breaking While Loop
How can i break out from a while loop or for loop in vbscript.

in jscript we can use break etc..

in vbscript how can i do it. can i go to statment.

View Replies !   View Related
How To Write In A If Loop
Now i have this part of the code . below in the code i should not call Sp_Getattachment if the Id = 0

but sme how I am gettin an error if I insert the If statemnt.
This is the part of the code:

View Replies !   View Related
Loop Twice Through Records
I have what may be a simple question, how do I loop through a set of records twice? Here's a snapshot of what I have.

x = 0
do while rs.EOF = False
dim i
i = x
<input type=text name="FirstName<%=i%> " value="<%=rs("Child_First")%>">

'I'd like to be able to have these input fields posted twice for each record.
x = x +1

View Replies !   View Related

Copyright © 2005-08, All rights reserved