faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 6 people (50%) answered Yes
Recently 3 of 6 people (50%) answered Yes

Entry

How to introduce a Collapsible TOC list using the saveHistory behavior(IE5+)
How to persist current page status using the saveHistory(IE5+)
How to introduce "saveHistory" behavior (IE5+)

Jan 24th, 2009 08:58
Brad Kint, seo webmaster, osama said, i can do it, Hiroto Sekine, http://www.all.co.nz/support/withlove/indexd.htm


(IE5+):To introduce a collapsible TOC list, try the following code;
Also you can test how it works at the active sample site. At the page 
click a link to jump to another page, then click  the "bcack" button 
to 
return the starting page, you will see the page has been persisted the 
page status. Also you may download all the related files there.
Sample Coding:
<?xml version='1.1' encoding='windows-1252'?>
<!DOCTYPE HTML PUBLIC '-//W3C//DTD XHTML 1.1 Transitional//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml11-transitional.dtd'>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns="http://www.w3.org/TR/REC-html40">
:
:
<meta name='save' content='history' /> <---- don't forget
<style type='text/css'>
<!--
.saveHistory {
	behavior:url(#default#savehistory);
}
.tocItemHide { display: none; }
.tocItemShow { display: block; }
-->
</style>
<script>
function fnFlash(oTitle){
    var oList = F[oTitle.sourceIndex + 1];
    if (oList.className == "tocItemHide"){
        oList.className = "tocItemShow";
    } else {
        oList.className = "tocItemHide";
    }
}
function fnSave(){
    var sArray = "";
    var oTrap;
    for (var i=0; i<F.length; i++){
        oTrap = F[i];
        if ((oTrap.tagName == "OL") && (F[i-1].className == "tocHead"))
{
            if (sArray.length == 0){
                sArray = oTrap.className;
            } else {
                sArray += "|" + oTrap.className;
            }
        }
    }
    oPrimaryTOC.setAttribute("sPersistState", sArray);
}
function fnLoad(){
    var sArray = oPrimaryTOC.getAttribute("sPersistState");
    var cycle = 0;
    var oArray;
    var oTrap;
    if ((!sArray) && (bTrapError)){
        bError = true;
        return false;
    }
    oArray = sArray.split("|");
    for (var i=0; i<F.length; i++){
        oTrap = F[i];
        if ((oTrap.tagName == "OL") && (F[i-1].className == "tocHead"))
{
            oTrap.className = oArray[cycle];
            cycle ++;
        }
    }
}
</script>
:
:
<body>
<div>
<ol id="oPrimaryTOC" class="saveHistory" OnSave="fnSave();" 
OnLoad="fnLoad();">
<li><div class="tocHead" onclick="fnFlash(this)">header 1</div></li>
<ol class="tocItemHide">
<li><a href='xxxx..xx.htm'>xxxxxx..xxxxx</a></li>
<li><a href='xxxxx..x.htm'>xxxxxx..xxxxx</a></li>
:
</ol>
<li><div class="tocHead" onclick="fnFlash(this)">header 2</div></li>
<ol class="tocItemHide">
<li><a href='xxxx..xx.htm'>xxxxxx..xxxxx</a></li>
<li><a href='xxxxx..x.htm'>xxxxxx..xxxxx</a></li>
:
</ol>
:
</div>
</body>
http://forsakringguide.blogspot.com
http://ghiddeasigurare.blogspot.com
http://guidedelassurance.blogspot.com
http://reiseneuropa1.blogspot.com
http://europadecalatorie.blogspot.com
http://reizeneuropa1.blogspot.com
http://rejsereuropa.blogspot.com
http://consiglibellezza1.blogspot.com
http://www.stupidarticles.com
http://www.halazona.com
http://www.shikapika.com
http://www.stakoza.com
http://www.uploadarticles.com
http://www.ganazat.com
http://www.damima.com
http://www.tarabiza.com
http://www.articlesxarticles.com
http://www.articlesfreedirectory.com
http://dir.msryat.org
http://up.msryat.org
http://forums.msryat.org
http://msryat.org/egypt
http://msryat.org/egypt/1.htm
http://msryat.org/egypt/2.htm
http://msryat.org/egypt/3.htm
http://msryat.org/egypt/4.htm
http://msryat.org/egypt/5.htm
http://msryat.org/egypt/6.htm
http://msryat.org/egypt/7.htm
http://games.msryat.org
http://forums.msryat.org/forumdisplay.php?f=30
http://forums.msryat.org/forumdisplay.php?f=38
http://forums.msryat.org/forumdisplay.php?f=31
http://forums.msryat.org/forumdisplay.php?f=49
http://forums.msryat.org/showthread.php?t=21741
http://forums.msryat.org/showthread.php?t=18403
http://forums.msryat.org/showthread.php?t=18457
http://forum.5ligi.com
http://forum.4kwt.com
http://forums.msryat.org/showthread.php?t=21577
http://msryat.org
http://3rabstarz.com/vb
http://dir.3rabstarz.com
http://3rabstarz.com
http://3rabstarz.com/vb/f118.html
http://3rabstarz.com/vb/f7.html
http://3rabstarz.com/vb/f59.html
http://wellcene.blogspot.com/
http://hindisongsdownloading.blogspot.com/
http://firstseomaster.blogspot.com/
http://bell-phones.blogspot.com/
http://more-poker-7u.blogspot.com/
http://jobs-online-blogs.blogspot.com/
http://threx.blogspot.com/
http://mobile-phone-service.blogspot.com/
http://msfunny.blogspot.com/
http://television-online-blogs.blogspot.com/
http://movies-online-blogs.blogspot.com/
http://music-online-blogs.blogspot.com/
http://business-online-blogs.blogspot.com/
http://software-online-blogs.blogspot.com/
http://gambling-online-blogs.blogspot.com/
http://hardware-online-blogs.blogspot.com/
http://computers-online-blogs.blogspot.com/
http://games-online-blogs.blogspot.com/
http://videogames-online-blogs.blogspot.com/
http://health-online-blogs.blogspot.com/
http://astrology-love.blogspot.com/
http://onlinemakefriends.blogspot.com/
http://marketingseo2008.blogspot.com/
http://mobile-phone-service.blogspot.com/
http://directorysubmissionlist.blogspot.com/
http://twenty-twenty-worldcup.blogspot.com/
http://tour-honeymoon.blogspot.com/
http://rajasthan-tour-travels.blogspot.com/
http://wallpaperblogs.blogspot.com/
http://ringsgemstone.blogspot.com/
http://wholesaleflowerblogs.blogspot.com/
http://giftsblogs.blogspot.com/
http://kitchenfurnitureblogs.blogspot.com/
http://shershayarighazal.blogspot.com/
http://addictionsblogs.blogspot.com/
http://agingblogs.blogspot.com/ 
http://allnursingblog.blogspot.com 
http://alternativeblogs.blogspot.com/ 
http://apartmentlivingblogs.blogspot.com/ 
http://beautyandblog.blogspot.com 
http://childhealthblogs.blogspot.com/ 
http://conditionsanddiseases.blogspot.com/ 
http://conferencesblogs.blogspot.com/feeds/ 
http://consumerinformationblogs.blogspot.com/ 
http://cooking4blogs.blogspot.com 
http://disabilitiesblogs.blogspot.com 
http://childeducationblogs.blogspot.com/ 
http://emergencypreparationblogs.blogspot.com/ 
http://employmentsblog.blogspot.com 
http://environmentalhealthblogs.blogspot.com/ 
http://famiesblogs.blogspot.com 
http://fitnesblogs.blogspot.com/ 
http://gardeninghomeblogs.blogspot.com/ 
http://healthcareindustryblogs.blogspot.com/ 
http://homeautomationblogs.blogspot.com/ 
http://homeandbusinessblog.blogspot.com/
http://homebuyersblogs.blogspot.com/ 
http://insurance4blog.blogspot.com/ 
http://medicaltourismblogs.blogspot.com/ 
http://medicinesblog.blogspot.com/ 
http://menshealthblogs.blogspot.com 
http://mentalhealthblogs.blogspot.com/ 
http://newsandmediablogs.blogspot.com/ 
http://occupationalhealthandsafetyblog.blogspot.com 
http://organizationsblogs.blogspot.com/ 
http://pharmacyblogs.blogspot.com/ 
http://productsandshoppingblogs.blogspot.com/ 
http://regionalblogs.blogspot.com/ 
http://teenhealthblogs.blogspot.com/ 
http://travelhealthblogs.blogspot.com 
http://weight-lossblogs.blogspot.com 
http://womenshealthblogs.blogspot.com 
http://homeimprovementblogs.blogspot.com/
http://homemakingblogs.blogspot.com/
http://homeownersblogs.blogspot.com/
http://personalfinancesblogs.blogspot.com/
http://personalorganizationblogs.blogspot.com/
http://pet4blogs.blogspot.com/
http://shopingblogs.blogspot.com/
http://businessandsocietyblogs.blogspot.com/
http://customerservicesblogs.blogspot.com/
http://e-commerceblogs.blogspot.com/
http://educationandtrainingblogs.blogspot.com/
http://humanresourcesblogs.blogspot.com/
http://healthcaresblogs.blogspot.com/
http://automotivesblogs.blogspot.com/
http://realestatesblogs.blogspot.com/
http://electronicsandelectricalblogs.blogspot.com/
http://telecommunication2blog.blogspot.com/
http://merchantaccountservicesblogs.blogspot.com/
http://internetmarketingsblogs.blogspot.com/