jQuery serialize empty result on bad HTML form

Posted on 30.12.16   Javascript jQuery

TIL that jquery’s $('#someform').serialize(); will output nothing if there’s a syntax error in the form HTML markup.

I actually added a parameter to a <select> field, so it looked like <select type="type" name="type"> , obviously I wasn’t paying much attention because type="type" shouldn’t be there at all. As soon as I removed that parameter jquery serialize would work as intended again.

hours_spent_debugging_pebkac += 1;

More on ITDB

Managing WiFi profiles in Windows 10

Change Resize Mode for all VMs in RoyalTS 4

Create a cmd alias/shortcut for issuing commands on remote computer

How to debug a non starting application with ProcMon

Telnet alternative to check if port is open on host