Submit to external url via Ajax & get return
Sounds like it's spinning forever because of the js error. 

Where is the error occurring? In jQuery library? 

If so use an uncompressed version of jQuery and it may be easier to debug. 

Maybe even temporarily hack jQuery core to remove error and see if that fixed your problem before spending time figuring out how to fix it properly...