Browser Compatibility Issues – Part II

So next to discussing the HTML/XHTML and CSS major issues when it comes to cross-browser testing, comes a third one which is as important especially when making your pages more interactive, the JavaScript. 

This part is not meant to discuss all the JavaScript issues cross-browser, yet just useful tips to tackle those issues. 

If one is interested on knowing which browser is supporting what version of JavaScript, here’s a list that I came across in my research: http://ejohn.org/blog/versions-of-javascript/

The reason I thought of this post is what I’ve been seeing as mishandling of some browsers to my legacy javascript and what I proposed to my colleagues to do. Where I work, there’s a big deal of working with legacy JavaScript, though I have been doing most of the DOM changes in JQuery now. 

Problem: 

The users would go to our site on an IPad, IE9 and Safari on a Windows machine, click submit of their order. If their connection is slow (by any chance) and especially those using IPad since they might not be on a wifi at the time, they click submit again, and again and again.. 

Those four times of submission will actually cause 4 submissions on the backend whereas on a normal machine, the submission times aren’t affected as long as the page is loading.

Partial Solution:

Some suggested to use this.disabled on the anchor of the submit. This solved the problem on IE9 but not on IPad and Safaris. 

Solution: 

I suggested using JQuery because of its compatibility on different browsers since you don’t have to deal with what browser using what version of Javascript. 

Not only, one should consider using JQuery or any of the other reliable JavaScript libraries for their fancy animations, ease of writing, good documentation and provided methods. But one should also consider that they do play a big role in cross-browser functionality. 

Notes: 

JQuery Browser Compatibility

Advertisements