{"id":251,"date":"2009-10-12T17:11:02","date_gmt":"2009-10-12T11:41:02","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=251"},"modified":"2016-08-24T15:45:45","modified_gmt":"2016-08-24T10:15:45","slug":"ajax-request-progress-indicator","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/","title":{"rendered":"Ajax Request Progress Indicator"},"content":{"rendered":"<p>In my current project, I used ajax to fetch data from the server to <a title=\"user experience design services\" href=\"http:\/\/www.tothenew.com\/experience-design\">provide experience like Desktop Application<\/a>. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery library.<\/p>\n<p>Make sure the following HTML is included on every page where AJAX requests are made. (Place it in body of the main layout so that you do not have to repeat this HTML on each page.<\/p>\n<p>Make sure the following javascript code has been executed before any AJAX request is made. (Move this to a js file and include it in Heading part of the main layout).<\/p>\n<p>The above trick worked for me and hope it works for you guys too.<\/p>\n<p>Helpful links :-<br \/>\nhttp:\/\/www.prototypejs.org\/api\/ajax\/responders<br \/>\nhttp:\/\/docs.jquery.com\/Ajax\/jQuery.ajax<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":16,"footnotes":""},"categories":[1],"tags":[96,1178,55,27,138],"class_list":["post-251","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ajax","tag-ajax-crawling","tag-javascript","tag-jquery","tag-prototype-library"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Bhagwat Kumar\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Ajax Request Progress Indicator | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Ajax Request Progress Indicator | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#article\",\"name\":\"Ajax Request Progress Indicator | TO THE NEW Blog\",\"headline\":\"Ajax Request Progress Indicator\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2009-10-12T17:11:02+05:30\",\"dateModified\":\"2016-08-24T15:45:45+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":6,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#webpage\"},\"articleSection\":\"Technology, Ajax, ajax crawling, javascript, jquery, prototype library\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#listItem\",\"name\":\"Ajax Request Progress Indicator\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#listItem\",\"position\":3,\"name\":\"Ajax Request Progress Indicator\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/\",\"name\":\"Bhagwat Kumar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d6c506f803fe26906ef802b1eaee463146e449a8b5b3d1f7e4ebc715b933d620?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Bhagwat Kumar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/\",\"name\":\"Ajax Request Progress Indicator | TO THE NEW Blog\",\"description\":\"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/ajax-request-progress-indicator\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"datePublished\":\"2009-10-12T17:11:02+05:30\",\"dateModified\":\"2016-08-24T15:45:45+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Ajax Request Progress Indicator | TO THE NEW Blog","description":"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery","canonical_url":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#article","name":"Ajax Request Progress Indicator | TO THE NEW Blog","headline":"Ajax Request Progress Indicator","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2009-10-12T17:11:02+05:30","dateModified":"2016-08-24T15:45:45+05:30","inLanguage":"en-US","commentCount":6,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#webpage"},"articleSection":"Technology, Ajax, ajax crawling, javascript, jquery, prototype library"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#listItem","name":"Ajax Request Progress Indicator"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#listItem","position":3,"name":"Ajax Request Progress Indicator","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/","name":"Bhagwat Kumar","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d6c506f803fe26906ef802b1eaee463146e449a8b5b3d1f7e4ebc715b933d620?s=96&d=mm&r=g","width":96,"height":96,"caption":"Bhagwat Kumar"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/","name":"Ajax Request Progress Indicator | TO THE NEW Blog","description":"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"datePublished":"2009-10-12T17:11:02+05:30","dateModified":"2016-08-24T15:45:45+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Ajax Request Progress Indicator | TO THE NEW Blog","og:description":"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery","og:url":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Ajax Request Progress Indicator | TO THE NEW Blog","twitter:description":"In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"251","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 23:59:43","updated":"2024-02-29 08:53:50","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAjax Request Progress Indicator\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Ajax Request Progress Indicator","link":"https:\/\/www.tothenew.com\/blog\/ajax-request-progress-indicator\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=251"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/251\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}