Jump to content

Repeat Nesting record


ibrahimjan
 Share

Recommended Posts

HI ALLI need help with the following code, please excuse my lack of knowledge in asp, I need to repeat a record and pass it to an object as shown, but I cant get the repeat nesting to work correctly, can you please advice, how i can make it work correctly.thank you<%Dim HEADDim Repeat3__numRowsDim Repeat3__indexWhile ((Repeat3__numRows <> 1) AND (NOT text_head.EOF))HEAD = (text_head.Fields.Item("head_TX").Value)Repeat3__index=Repeat3__index+1Repeat3__numRows=Repeat3__numRows-1text_head.MoveNext()Wend%><object type="image/svg+xml" data="/gallery/svg/layout1.svg" width="500" height="640"> <param name="text-label1" value="<%=HEAD%>" /><param name="text-label3" value="<%=HEAD%>" /></object>

Link to comment
Share on other sites

Hi I did it this way with the response.write inside the object, but still not paging through the table, its displaying the same row in head_TX??<object type="image/svg+xml" data="/gallery/svg/layout1.svg" width="500" height="640"><%Dim HEADDim Repeat3__numRowsDim Repeat3__indexHEAD = (text_head.Fields.Item("head_TX").Value)While ((Repeat3__numRows <> 1) AND (NOT text_head.EOF))Response.Write "<param name=""text-label1"" value="""& HEAD &""" />"Repeat3__index=Repeat3__index+1Repeat3__numRows=Repeat3__numRows-1text_head.MoveNext()Wend%></object>

Edited by Ibrahim Home Jan
Link to comment
Share on other sites

Now you moved HEAD out of the loop. The line where you assign HEAD, and the line where output HEAD, both need to be inside the loop. The loop is supposed to get the new value and write it out, not one or the other. In your first piece of code you were getting all of the values, but then writing only one, and in the second version you only get one value, then write it out several times. The loop needs to both get the value, and write it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...