KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a search form with a number of text inputs & drop downs that submits via a GET. I'd like to have a cleaner search url by removing the empty fields from the querystring when a search is performed. var form = $("form"); var serializedFormStr = form.serialize(); // I'd like to remove inputs where value is '' or '.' here window.location.href = '/search?' + serializedFormStr Any idea how I can do this using jQuery?
Tags (comma-separated)
Save Edits
Cancel