kjohnson530
IS-IT--Management
Hello all I hope someone can help me resolve a little issue I'm having.
I have created a webpage that displays certain information from a SQL database using a repeat region (using dreamweaver.) My users want to update this "list" (meaning multiple records at same time.)
So I decided to add a select box for the updatable field. I gave it a dynamic name using a loop. to see what I believe to be the relevant code below:
I then direct the page to an update page using a submit button.
On the update page I pull the hidden field value using request.form. I'm using this as a loop variable to determine how many objects were on the other page and to get their names so that their values can be written to the page.
My problem is this. If i do a response.write(z) it will display the name of the dynamic fields I have created on the other page. My problem is that my page will not display the contents of the dynamic pulldowns, it simply comes up blank.
Once I pull this information properly I will then be looking to pull two other fields (one being a primary key for my db) so that I can update all the necessary info to my db.
Can anyone offer any reasons why this isn't working? If anyone has a better way I certainly wouldn't mind that input as well.
thanks,
I have created a webpage that displays certain information from a SQL database using a repeat region (using dreamweaver.) My users want to update this "list" (meaning multiple records at same time.)
So I decided to add a select box for the updatable field. I gave it a dynamic name using a loop. to see what I believe to be the relevant code below:
Code:
<select name=""" icount & ".cent" value="<%=(rs1.Fields.Item("CentSecID").Value)%>">
rs1.MoveNext()
icount = icount + 1
Wend
response.write"<input name=""count"" type=""hidden"" value=" & icount -1 & ">"
%>
I then direct the page to an update page using a submit button.
On the update page I pull the hidden field value using request.form. I'm using this as a loop variable to determine how many objects were on the other page and to get their names so that their values can be written to the page.
Code:
<%
dim varcount
varcount = (request.form("count"))
dim z
do until varcount = 0
z = (varcount & ".cent")
response.write(request.form(z))
varcount = varcount - 1
loop
%>
My problem is this. If i do a response.write(z) it will display the name of the dynamic fields I have created on the other page. My problem is that my page will not display the contents of the dynamic pulldowns, it simply comes up blank.
Once I pull this information properly I will then be looking to pull two other fields (one being a primary key for my db) so that I can update all the necessary info to my db.
Can anyone offer any reasons why this isn't working? If anyone has a better way I certainly wouldn't mind that input as well.
thanks,