From 8bc7badd029f58eefcb79afa55174417737c4fd2 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Thu, 8 Nov 2012 20:22:06 +0000 Subject: [PATCH] Opera errors out on null data values --- js/ajax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ajax.js b/js/ajax.js index ece1038cc6..561b61861c 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -405,7 +405,9 @@ AJAX.registerOnload('functions.js', function () { // Registering the onload event for functions.js // ensures that it will be fired for all pages $('form').not('.ajax').not('.disableAjax').each(function () { - $(this).data('onsubmit', this.onsubmit).attr('onsubmit', ''); + if ($(this).attr('onsubmit')) { + $(this).data('onsubmit', this.onsubmit).attr('onsubmit', ''); + } }); });