jquery - IE9 Submit-time CSS Repainting -


we have animated spinner gif use spice submit button after user has submitted form. if validation passes on form, assign background via jquery's css() method, setting background image, positioning , color in one.

ie9 not showing background image on submit, though continues seen in other browsers.

this technique has worked fine in previous ie browsers, seems have broken in ie9, including in older "browser modes". i'm not sure if bug in ie9, has changed behavior , cannot trust ie7/8 modes behave expected because of this.

it seems though maybe ie decides not more repainting after user has submitted form. if case i'm not sure i've got way around it, i'd think isn't case. ran previous problem technique in firefox, discovered firefox halts http requests besides form request itself, means if background image not in cache wouldn't work. because of we've taken preloading spinner on image object in memory.

interestingly, if manually call method updates css on button ie dev tools console, works fine. it's when have actual submit gets stuborn , fails draw in spinner. interestingly, does remove text submit button, second part of effect.

anyone have ideas on what's causing this/how prevent it?

here's slimmed down version of live()d code handles submit:

jquery.fn.disablesubmit = function() {     this.find("input[type=submit]").each(function() {         $(this).css({"background": "url(/asdasdasd.gif) no-repeat 50% 50%"});     });     return this; };  $("form").live("submit", function() {     var form = $(this);      form.disablesubmit();     return true; }); 

i had similar issue extjs , discovered discovered ie9 not loading new images after form has been submitted.

here workaround doesn't require preloading, though admittedly it's little hackish.

function() {         ext.messagebox.wait('searching tenants eligible rent increase...', 'searching');     settimeout(function() { document.getelementbyid('rental_increase_form').submit(); }, 200);     return false; } 

basically return false when form submit event fires, css loading, , manually submit form via javascript after timeout of 200 milliseconds.

i hope helps. did submit bug microsoft?


Comments

Popular posts from this blog

c++ - error: use of deleted function -

delphi - ESC/P programming! -

c# - how to write client side events functions for the combobox items -