[Twisted-Python] Retrieving Woven html element IDs

Donovan Preston dp at twistedmatrix.com
Wed Nov 19 09:12:20 EST 2003

On Nov 19, 2003, at 9:06 AM, Justin Johnson wrote:

> In woven, html elements are automatically given an id (eg. <div
> id="woven_id_18612312">... where the number is id(self) for the view). 
>  I
> have a div tag I'm trying to using to dump error logs into on the fly
> with LivePage and display them to the user.  It seems that I cannot
> reference a tag by name with javascript, so I need access to the
> auto-generated id.  If I had the id I could do something similar to the
> example below.
> Does anyone know if it's possible to lookup this id in woven

The best way to do it is to provide your own ID. When you add an id 
attribute to a
node, woven will refrain from overwriting it with an auto-generated one.


More information about the Twisted-Python mailing list