onchange and onclick triggers not calling external files in Internet Explorer

Onchange often does not work correctly in IE but onclick usually does so this problem did not appear to make sense.  Eventually after trial and error removal of all functions in the external file I found a function that was causing all functions in the file to fail.  The culprit was the following code:

  var data = (
    'order_id' : order_id,
    'key'  : key,
    'status' : status,
    'name' : name,
    'email' : email,
  );

which creates variables for a $post request.  This works in FF but not IE7.  Once this was removed then all the functions in the file now work.