:: Forum >>

How to cache a tab's target.

Hello ActiveWidgets Gurus!

I have a set of 4 tabs as shown in the code below. How can the target for each tab be cached so that if someone has gone halfway down page1.htm, then goes to page2.htm and back to page1.htm, page1.htm still remains half way down the page?


var names = ["Page1", "Page2", "Page3", "Page4"];

var values = ["page1.htm" , "page2.htm" , "page3.htm" , "page4.htm"];

var tabs = new AW.UI.Tabs;
tabs.setItemValue(values); // store page URLs in the 'value' property.

tabs.onSelectedItemsChanged = function(selected){

var index = selected[0];
var value = this.getItemValue(index);
window.status = index + ": " + value;
document.getElementById("myContent").src = value; // iframe URL

tabs.setSelectedItems([0]); // load the first page.

Tuesday, January 8, 2008
I guess you should remember scrollTop value of the page in iframe and restore it when the page is loaded again.
Alex (ActiveWidgets)
Wednesday, January 9, 2008

This topic is archived.

Back to support forum

Forum search