Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax Navigation Issue back button
    primarykey
    data
    text
    <p>I have an Ajax base Tab Switching Application in Java Spring Framework for which i have to handle Back button scenario. It was done successfully by below specifying code Now the effect am facing is first page load than tab switching jump appear for particular history selected Tab. If anybody help with Regards to this it would be great Thanks.</p> <pre><code>var innerTab = ""; function navigateAjaxHtmlSetup(target,response){ if (typeof target == 'undefined') target = "#ajax-container"; $(target).html(response); $("input[check-with-select]:checked").parent("label").parent("td").nextUntil(":last").find('select').attr('required', 'required'); $(target).focus(); $("#ajax-loader").hide(); } function pushStateToHistory(){ var history = window.history; var location = window.location.pathname; history.pushState({}, "GHFP", location+activeTabs()); } function anchorAjaxCall(self,url,state){ $.ajax({ type: 'GET', url: url, dataType: "html", success: function (response) { var target = self.attr('targeto'); navigateAjaxHtmlSetup(target,response); if (state) pushStateToHistory(); // if(innerTab != ""){ // var anchor = $("a#"+innerTab); // innerTab = ""; // anchorAjaxCall(anchor,anchor.attr('href')); // } } }); } function activeTabs(){ selectedTabList = $(".tabs-nav a.active"); var activeURL; if (selectedTabList.length &gt; 0){ activeURL="#"; selectedTabList.each(function(index,el){ activeURL +="/"+$(el).attr('id'); }); }else{ activeURL=""; } return activeURL; } function urlAjaxNavigationHandling(hash){ if (hash.indexOf('/')!=-1) { var selectedTabList = hash.substring(1,hash.length).split('/'); var anchor = $("a#"+selectedTabList[1]); anchorAjaxCall(anchor,anchor.attr('href'),false); if (selectedTabList.length &gt; 1) innerTab = selectedTabList[2]; } } window.onpopstate = function(e) { urlAjaxNavigationHandling(window.location.hash); }; </code></pre> <p>Although my Question didn't relate to Spring or Java at all i just specify those as tag if anybody google around to implement Ajax base Application. This may help him as i didn't find any builtin support for JQuery in Spring Framework as Ruby on Rails</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload