March 18th, 2003, 02:57 PM
Dynamic textbox validation
i am having trouble validating a piece of code that i cannot find out how to do...what i have is a form that is done in asp that loads info from the database...i have textfields that are dynamic and are an option to the user if they want to add comments...
here is snippet of the code that contains the text field i want to validate from the ASP page...
the part that i want to add validation is <input type=text name=wi" & currentposition & " size=50 value='Write-In'>, which you will see in the code below...
If office_positions("Position")= Session("COLLEGE") AND Session("LEVEL")<>"GR" AND Session("LEVEL")<>"DR" Then
If checkbox = "y" Then
response.write " <input type=checkbox name=senator1 value=writein1> <input type=text name=wisenator1 size=50 value='Write-In'><br>"
response.write " <input type=checkbox name=senator2 value=writein2> <input type=text name=wisenator2 size=50 value='Write-In'><p>"
checkbox = "n"
response.write " <input type=radio name=" & currentposition & " value=writein> <input type=text name=wi" & currentposition & " size=50 value='Write-In'><p>"
response.write "<hr><b> Senator Collegiate - " & office_positions("Title") & "</b><hr>"
if canidates("Canidate")="No Canidate" then
response.write " No Canidates are running for this position<br>"
response.write " <input type=radio name=" & office_positions("Position") & " value=" & canidates("Canidate_id") & "> "
response.write canidates("Canidate") & " (" & canidates ("Party") & ")<br>"
lastposition = office_positions("Position")
March 18th, 2003, 03:11 PM