Possible Duplicate:
How do I use jQuery's form.serialize but exclude empty fields
I need to remove the unused input names from a Serialize string if they're not filled in on a form. See the attached JSFIddle. Currently if someone only fills in Q1 & Q3 the names the string appears as follows /static/url/to/file.php?Q1=Bob&Q2=&Q3=Dan&Q4=. I'd therefore like to get rid of the Q2= and Q4= names from the string before submission. Thanks