[Twisted-Python] Retrieving Woven html element IDs

Justin Johnson justinjohnson at fastmail.fm
Wed Nov 19 09:06:46 EST 2003

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?


<script type="text/javascript">
function displayErrors() {
    id = 'errors'
    document.getElementById(id).innerHTML += '<span>some
<a href="#" onclick="displayErrors()">add to errors</a>
<div id="errors">

More information about the Twisted-Python mailing list