Skip to main content
Rollback to Revision 2
Source Link
Toby Speight
  • 81.8k
  • 14
  • 101
  • 309

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Modified

function createRequestObject(){var e,t=navigator.userAgent;return e="Microsoft Internet Explorer"==t?new ("Microsoft.XMLHTTP"):new XMLHttpRequest}function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Modified

function createRequestObject(){var e,t=navigator.userAgent;return e="Microsoft Internet Explorer"==t?new ("Microsoft.XMLHTTP"):new XMLHttpRequest}function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

added 1029 characters in body
Source Link
Ruchika
  • 103
  • 3

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Modified

function createRequestObject(){var e,t=navigator.userAgent;return e="Microsoft Internet Explorer"==t?new ("Microsoft.XMLHTTP"):new XMLHttpRequest}function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Modified

function createRequestObject(){var e,t=navigator.userAgent;return e="Microsoft Internet Explorer"==t?new ("Microsoft.XMLHTTP"):new XMLHttpRequest}function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();
remove thanks - say thanks by voting on answers; update wording, formatting
Source Link

Better Ajax AJAX script to load data for mobile phones from table

Am using ajaxAJAX script to have data fetched from database. For example has

Motorola Samsung Apple

  • Motorola
  • Samsung
  • Apple

as company and using ajaxAJAX to fetch models of it. Like when apple is selected then it shows apple i phoneiPhone 12, i phoneiPhone 13, i phoneiPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")} 

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

andIt is working too Wondering whats.

What is the new ajaxAJAX script in line with times which iI can use as against same.

Thanks?

Better Ajax script to load data from table

Am using ajax script to have data fetched from database. For example has

Motorola Samsung Apple

as company and using ajax to fetch models of it. Like when apple is selected then it shows apple i phone 12, i phone 13, i phone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")}var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

and is working too Wondering whats the new ajax script in line with times which i can use as against same.

Thanks

AJAX script to load data for mobile phones from table

Am using AJAX script to have data fetched from database. For example has

  • Motorola
  • Samsung
  • Apple

as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max

Using this older generic script as test basis which is like years old where when a field is selected of company name, then without reloading the page models list come under it.

function createRequestObject(){var e,t=navigator.appName;return e="Microsoft Internet Explorer"==t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}

function getRequest(e,t,n,a){elementId=t,loading_layer_in=a,http.open("get",e),http.onreadystatechange=ManipulateRequest,http.send(null)}

function getRequestalert(e){http.open("get",e),http.onreadystatechange=function(){if(4==http.readyState){var e=http.responseText;res=e}},http.send(null)}

function ManipulateRequest(){if(""==e)var e="<FONT><B>Loading please wait.........</B></FONT>";else msg=e;if(document.getElementById(loading_layer_in)&&(document.getElementById(loading_layer_in).style.display="block"),1==http.readyState);else if(4==http.readyState){var t=http.responseText;document.getElementById(elementId)&&(document.getElementById(elementId).innerHTML=t)}}

function hideLoadingLayer(e){var t=e;document.getElementById(t)&&(document.getElementById(t).style.display="none")} 

var elementId="",loadingMessage="",loading_layer_in="",http=createRequestObject();

It is working.

What is the new AJAX script in line with times which I can use as against same?

Source Link
Ruchika
  • 103
  • 3
Loading