Note
Checks to see if browser is IE based or other.
- function createRequestObject(handler)
- {
- var xmlHttp;
- try
- {
- // Firefox, Opera 8.0+, Safari
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.onload=handler;
- xmlHttp.onerror=handler;
- return xmlHttp;
- }
- catch (e)
- {
- // Internet Explorer
- try
- {
- xmlHttp=new ActiveXObject(“Msxml2.XMLHTTP”);
- return xmlHttp;
- }
- catch (e)
- {
- try
- {
- xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”);
- return xmlHttp;
- }
- catch (e)
- {
- alert(“Your browser does not support AJAX!”);
- return false;
- }
- }
- }
- }