How to retrieve the value of a Checkbox in HTML via Python

c0r3

New Member
I have no real knowledge of HTML but I have to use it to make a Webview for some Data.I want to have a button, that links to another python script to compare the Data Sets.You are able to choose which Datasets you compare by checking a checkbox.Then the button should bring you to the right script.The compare function, the list of Data Sets, etc. all works, but i can't seem to get the value of the Checkboxes.This generates the List of Checkboxes\[code\] query_3 = App.QueryFactory.new("XMLQuery", xml_2 %(p1, p2, p3)) for smlz in query_3.getAll(): resultz += '''<input type="checkbox" name="sml_id" value="http://stackoverflow.com/questions/12797285/%s"> <a href="http://xxx:xxx/xxxxx?sml_1=%s&gewinde=&kopf=&antrieb=&singlesearch=Suche">%s | ID: %s |</a><br><br>''' % ( smlz.id, smlz.id, smlz.status, smlz.id)return resultz\[/code\]This is the code of the button:\[code\]comparebutton = """<td><input type="button" onclick="window.location.href = 'http://xxxx:xxxx/xxxx?sml_1=%s&gewinde=&kopf=&antrieb=&singlesearch=Suche';" value="http://stackoverflow.com/questions/12797285/Vergleichen"></td>\n""" % cb_idkeyw_c = str(kwds.get("sml_id")) keyw_c_l = keyw_c.split() key_c_len = len(keyw_c_l)cb_id = ''p = 0while p < key_c_len: temp_1 = str(keyw_c_l[p]) temp_2 = temp_1.strip(",[]'") p += 1 cb_id += "%s_" % temp_2\[/code\](Note: The _ is needed as the script i want to link to is able to show more than one Data set when dividing the Data ID's by underscores, thus "comparing" the Datasets)I tried get, getAll etc, to get the Value of the Checkboxes i checked, but i always get 'None'Did i do something wrong or is it possible to make this easier by making a button that executes a certain function of my python code, since i have the code of the "compare" script, i just lack the HTML knowledge to do anything like that.
 
Back
Top