Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static variables?

Status
Not open for further replies.

glwong

Programmer
Jul 13, 2001
15
US
Hi, I am new to ASP and have a background in Java programming, I am trying to create a form table that allows the user to add rows dynamically to it but I can't seem to get the variable to work correctly, it keeps reseting to the input field. I, in essence need the equivalent of a static variable. Thanks in advanced for your time. Here's some of the code I've been working on:


if (Request("totalRows") < 5) then
rows = 5
else
rows=Request("totalRows")
end if

for i=1 to rows
......create rows in table
next

x = i + Request("numRows")
Response.write("Add rows &nbsp;&nbsp;<input name=numRows value="""&Request("numRows")&""" onChange=""document.location='
 
You need a hidden field to read on page entry and pass on the field value and update it on each access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top