[Twisted-web] problems with select boxes.
Alberto Trujillo
alberto.trujillo at ucd.ie
Mon Nov 7 06:05:08 MST 2005
Hi everybody:
My question is the next one.
I have implement a form in stan with two select box. The first one is full of datas
(select1), and the second one is empty(select2). Also I have two
buttons, one to transfer datas from select1 to select2 (button1) and the
other to do the opposite.
Until now I only can get the value of the item which is selected, but I don't know how to get the text.
This is what I'm doing.
/T.input(name="button1", value="+", type="button",
onclick=livepage.server.handle("addItem", /
/livepage.get("select1").value, livepage.get("select1").text)/
/..../
/def handle_addItem(self,ctx, value, text):/
/ print "value: %s text: %s" % (value, text)/
/ yield livepage.set("select2", value, text)/
I only can see the value with the print function, because text is undefined.
How can I get the text, and how can add this values after in the select2?
I'm running Nevow 0.5.
Thanks in advance.
More information about the Twisted-web
mailing list