how to write event handler for dropdown list

mc.pandey at mc.pandey at
Fri Nov 23 12:43:31 CET 2007


I am new to python,
Can someone help me with writing event handler for a dropdown list in

i have one function to create dropdown list in a file

def dropdown_options(self,title,options,name,value = None):
        ret = "\n<span class = \"title\">"+ title.title() + "</span>
        if (options != []):
            ret += "<select id = \"sel\" name = "+name+">\n"
            for i in options:
                if (value != None and str(value) == str(i[0])):
                    ret += "<option selected = \"1\" value =
                    ret += "<option value = \""+str(i[0])
            ret += "</select>"
            ret += "No options available for this item"
        return ret

and i am calling this from another file

ret += ui.dropdown_options("Project",db.getprojects(user),"proj") +

Now i want to do some activity when i select diffrent options from the
dropdown list.

Any help is appreciated !!

More information about the Python-list mailing list