Yes that worked well! All I needed to do to your code was to convert the nr value returned from the template back to an int in the controlelr
On Fri, Feb 15, 2013 at 12:57 AM, Christoph Zwerschke <[email protected]> wrote: > Am 14.02.2013 23:47, schrieb Vidya Setlur: > >> Thanks for your response. Then my follow-up question is, is it >> possible to dynamically create a new html file containing an image >> from the list iterator? > > > Sure, you could pass the controller the current image number, and the > controller would get the image source and the next image number and feed it > to the template. > > The template would look like this: > > <img src="$src"> > <form action="show_img"> > <input type="hidden" name="nr" value="$nr"> > <button type="submit">Refresh</button> > </form> > > The controller would be something like this: > > def show_img(self, nr=0): > return dict(src=image_sources[nr], > nr=(nr + 1) % len(image_sources)) > > Alternatively, you can keep nr in the session. > > If you really want to refresh only the image, not the whole page, you need > JavaScript. > > > -- Christoph > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/turbogears?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

