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 Shaun E 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'm not sure if this is the right forum but I am new to ASP and JavaScript, 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:
Form.asp

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='
 

That is VBScript, not Javascript. No wonder you're having a hard time if you don't even know the name of the language you're programming in ;o)

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top