Side navigation
#12772 closed bug (notabug)
Opened October 20, 2012 01:22PM UTC
Closed October 20, 2012 01:42PM UTC
JQuery tabs cache issue when content loaded thru ajax?
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I am facing the issue with jquery tabs when going for cache. The scenario is this. I have got list of customers in table on my jsp page which has customer name has hyperLink. Say i clicked the customer 1 link, that record opens up in jquery tab i.e TAB1 with data loaded thru ajax call.Basically call goes to server side which returns back the CustomerView.jsp content and loaded in tab. CustomerView.jsp has html form associated with it and some javascript functions. Now i clicked the customer 2 link, CustomerView.jsp response is appended to TAB2. As long as i do any activity on that tab, everything works fine. But the moment the comes back to TAB1, javascript function corresponding to TAB2 is executed(Not the functions associated with TAB1). The reason i think is i am using jquery tabs with cache.Because of this javascript functions associated with last tab are on the top and when i come back to Tab1, Functions on the top(asscociated with TAB2) are called. In Nutshell, this is is the issue when i am opening multiple tabs and response in tab comes through server which is the same JSP page. JSP Page has form and javascript functions associated with it. When i cache the tabs contents so that the content already loaded does not go to server again, ideally javascript function associated with same page should be executed but what is happening is javascript function associated with that page is not executed. Ideally when we click the tab, only content specific to that page should be active.
This gets resolved as i don't cache the content. Is there any workaround avaialble for now till this issue gets resolved where i can cache the previuos loaded tabs and javascript functions associated with that corresponding tabs are executed?
to fetch the content only first time
for further calls bring it from cache
$("#tabs_selector").tabs({ ajaxOptions: { cache: true },
cache: true });
Attachments (0)
Change History (1)
Changed October 20, 2012 01:42PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
If you've discovered a jQuery UI bug, please report it in the jQuery UI bug tracker and include a test case. From the description I would advise starting in our forum, or StackOverflow.