コード例 #1
0
# t2 is a widget that represents the text area
# element inside of the second iframe
t2 = IframeWrap( TextArea(po,{'base':'t2'}),
                 ['frame2', 'frame1'] )


# print out the current text in the widgets
print "t0.value = %s" % (t0.value)
print "t1.value = %s" % (t1.value)
print "t2.value = %s" % (t2.value)

# update the text in the widgets
t0_new_text = 't0 text'
t1_new_text = 'new t1 text'
t2_new_text = 'new t2 text too'
print "updating t0 to say: %s" % (t0_new_text)
print "updating t1 to say: %s" % (t1_new_text)
print "updating t2 to say: %s" % (t2_new_text)

t0.value = t0_new_text
t1.value = t1_new_text
t2.value = t2_new_text

# print out the new text in the widgets
print "t0.value = %s" % (t0.value)
print "t1.value = %s" % (t1.value)
print "t2.value = %s" % (t2.value)

browser.close()