In a python cgi script I have many selects in a form (100 or so), and each select has 5 or 6 options to choose from. I don’t want to have a separate submit button, so I am using onchange="submit();" to submit the form as soon as an option is selected from one of the many selects. When I read the form data with form.keys() the name of every select on the form is listed instead of just the one that was changed. This requires me to compare the value selected in each select with the starting value to find out which one changed and this of course is very slow. How can I just get the new value of the one select that was changed?
In a python cgi script I have many selects in a form (100 or
Share
If every
selectshould be the only value that’s needed, then every select is basically aformon its own.You could either remove all other
selects when you activate a single select (which is prone to errors), or simply put every select in its ownforminstead of using one giantform. Otherwise all data is going to be send.