I check it and find that it's my mistake. When I use JSON dictionary
structure to submit, and read it like:
for item in dictionary
so the sequence which is written to database is not kept. When I use
data to render, the problem came out.

thanks, Karl.

On 12月15日, 下午11时12分, Karl Swedberg <k...@englishrules.com> wrote:
> are you sure that the <tr> IDs are being rendered in the right order?  
> View source to double check. If they are correct in the html, could  
> you point us to a test page where you're experiencing the problem?
>
> thanks,
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 15, 2009, at 3:47 AM, elprup wrote:
>
>
>
> > hello guys, I use django template to generate a HTML like this:
>
> >        {% for type in types %}
> >        <tr id="list_{{type.id}}" class="itemrow">
> >          <td width="70" align="middle" class="list_typename">
> > {{type.name}}</td>
> >        </tr>
> >        {% endfor %}
>
> > typeid increases from 1 by 1.
>
> > I use class traverse to get the sequence of the list:
>
> >  sendstr = "";
> >  $(".itemrow").each(function(index, value) {
> >    type = $(this).attr('id').substring(5);
> >    sendstr += type;
> >   });
>
> > I expect sequence to be like 12345, but the result is 13254. I'm
> > confused.
>
> > Can anyone help me. Thanks

Reply via email to