It's times like these, I reach for the F12 key.
The last time I did such a client-side modification, was an online quality system where it wanted a graphic for a signature. You could choose from a couple built-in script fonts (ugh, useless), or draw your own on a HTML canvas. You know, with a mouse (triple ugh!).
So after some poking around, I was able to import a scan of my actual signature (it's fairly difficult to access files in JS, and rightfully so; best way turned out to be, paste in the base-64 encode), format it as an image and add it to the canvas, and save that as my signature.
I don't know if your problem was a client-side validation, but if it was, you can snoop through the script and see what's happening. Best case, "undefined" is literally just that, a variable with no value assigned. Find the variable, assign it a handy number like 1, and try again. Worst case, the response is a postback from the server (server side validation) and you have to call up sales instead.
Tim