Wednesday, January 20, 2016

Tested with IE, Chrome, Safari...oh wait

When I start a new project, particularly when doing a POC, I'll often grab something I've done in the past that is similar and begin to tweak from there. But as POCs tend to evolve, problems occur when my assumptions remain the same. That "tested with..." disclaimer tag that came across from the borrowed project just won't cut it as is.

Case in point: a pretty important line of code that can help generate revenue. Turns out this didn't work with Safari / Chrome:
$('#btnSubmit').trigger('submit');
But this does:
$('form#ajaxForm').trigger('submit');
A good reminder to actually test and not assume. I'm glad I have a co-worker who has a knack for breaking things before customers do.