On Wed, May 11, 2011 at 2:29 PM, Pravin Dhayfule <[email protected]>wrote:
> Was pleased to see the Non-Flash animation on google's site today, and so
> went ahead to view its code for how it managed to get rid of a proprietary
> animation tool, and was shocked to see usage of Microsoft's ActiveX control
> if(window.ActiveXObject){a=new ActiveXObject("Msxml2.XMLHTTP");if(!a)a=new
> ActiveXObject("Microsoft.XMLHTTP")}
>
>
See this is how every developer create AJAX application..
see, there is a "if" condition applied there..
checkout how ajax work in very simple manner here - This is nothing wrong..
Check this -> http://www.szajkowski.com/ajaxsample.html
var xmlHttpReq = false;
* // Mozilla/Safari*
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
// See note below about this line
}
* // IE*
} else if (window.ActiveXObject) { // IE
try {
xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
you can see if/else condition.. this is way of writing html/js code so that
ajax should work in all type of browser.. You can understand like -- "This
is compatibly of code in all browser , otherwise no website of world will
run on IE"
You can also see pain of developer who has to learn Standard and
non-standard way to make website functional and that is why every
web-developer hate IE...
_______________________________________________
network mailing list
[email protected]
http://lists.fosscom.in/listinfo.cgi/network-fosscom.in